aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-addr.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-24 20:21:08 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-24 20:21:08 +0000
commit93b53ca279865363a3352017c1d4456cc58e7de4 (patch)
tree24bb024fc5c1d21ec0ed470d17d912eca47f100c /elf/dl-addr.c
parent7463d5cb4d42ffa944f05415f9d320b1b64d2bcf (diff)
downloadglibc-93b53ca279865363a3352017c1d4456cc58e7de4.tar
glibc-93b53ca279865363a3352017c1d4456cc58e7de4.tar.gz
glibc-93b53ca279865363a3352017c1d4456cc58e7de4.tar.bz2
glibc-93b53ca279865363a3352017c1d4456cc58e7de4.zip
[BZ #2683]
2006-08-24 Ulrich Drepper <drepper@redhat.com> [BZ #2683] * elf/dl-addr.c (_dl_addr): Don't ignore all undefined symbols. If symbol has a value use it. * elf/tst-dladdr1.c: New file. * elf/Makefile: Add rules to build and run tst-addr1.
Diffstat (limited to 'elf/dl-addr.c')
-rw-r--r--elf/dl-addr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 5d3719adb2..720b24d04b 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -91,7 +91,8 @@ _dl_addr (const void *address, Dl_info *info,
{
/* The hash table never references local symbols
so we can omit that test here. */
- if (symtab[symndx].st_shndx != SHN_UNDEF
+ if ((symtab[symndx].st_shndx != SHN_UNDEF
+ || symtab[symndx].st_value != 0)
#ifdef USE_TLS
&& ELFW(ST_TYPE) (symtab[symndx].st_info) != STT_TLS
#endif
@@ -125,7 +126,8 @@ _dl_addr (const void *address, Dl_info *info,
#ifdef USE_TLS
&& ELFW(ST_TYPE) (symtab->st_info) != STT_TLS
#endif
- && symtab->st_shndx != SHN_UNDEF
+ && (symtab->st_shndx != SHN_UNDEF
+ || symtab->st_value != 0)
&& DL_ADDR_SYM_MATCH (match, symtab, matchsym, addr)
&& symtab->st_name < strtabsize)
matchsym = (ElfW(Sym) *) symtab;