diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Versions | 2 | ||||
-rw-r--r-- | elf/dl-addr.c | 7 | ||||
-rw-r--r-- | elf/dl-debug.c | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/elf/Versions b/elf/Versions index 3797cc4eee..e24b2de04c 100644 --- a/elf/Versions +++ b/elf/Versions @@ -54,5 +54,7 @@ ld { _dl_get_tls_static_info; _dl_allocate_tls_init; _dl_tls_setup; _dl_rtld_di_serinfo; _dl_make_stack_executable; + # Only here for gdb while a better method is developed. + _dl_debug_state; } } diff --git a/elf/dl-addr.c b/elf/dl-addr.c index c418784b4f..685cab9be8 100644 --- a/elf/dl-addr.c +++ b/elf/dl-addr.c @@ -92,6 +92,9 @@ _dl_addr (const void *address, Dl_info *info, dynamic symbol table!! */ for (matchsym = NULL; (void *) symtab < (void *) symtabend; ++symtab) if (addr >= match->l_addr + symtab->st_value +#if defined USE_TLS + && ELFW(ST_TYPE) (symtab->st_info) != STT_TLS +#endif && ((symtab->st_size == 0 && addr == match->l_addr + symtab->st_value) || addr < match->l_addr + symtab->st_value + symtab->st_size) @@ -110,8 +113,10 @@ _dl_addr (const void *address, Dl_info *info, { /* We found a symbol close by. Fill in its name and exact address. */ + lookup_t matchl = LOOKUP_VALUE (match); + info->dli_sname = strtab + matchsym->st_name; - info->dli_saddr = (void *) (match->l_addr + matchsym->st_value); + info->dli_saddr = DL_SYMBOL_ADDRESS (matchl, matchsym); } else { diff --git a/elf/dl-debug.c b/elf/dl-debug.c index 2e7b9e84b9..bd6ee69189 100644 --- a/elf/dl-debug.c +++ b/elf/dl-debug.c @@ -57,3 +57,4 @@ void _dl_debug_state (void) { } +rtld_hidden_def (_dl_debug_state) |