aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-addr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-19 16:44:56 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-19 16:44:56 +0000
commita019191bbab9ac595ed1c792fd4bc0e1cadd7411 (patch)
tree5c87c2fb8926990f5373eeeb6a9bc887d421d6a0 /elf/dl-addr.c
parent0325dd20dd9e13794c09b1e0687ecd1ef2081de0 (diff)
downloadglibc-a019191bbab9ac595ed1c792fd4bc0e1cadd7411.zip
glibc-a019191bbab9ac595ed1c792fd4bc0e1cadd7411.tar.gz
glibc-a019191bbab9ac595ed1c792fd4bc0e1cadd7411.tar.bz2
Update.
* elf/dl-addr.c (_dl_addr): Don't look at STT_TLS symbols. Use DL_SYMBOL_ADDRESS to set dli_saddr.
Diffstat (limited to 'elf/dl-addr.c')
-rw-r--r--elf/dl-addr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index c418784..685cab9 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
{