Skip to content

Commit

Permalink
* sysdeps/generic/ldsodefs.h (DL_ADDR_SYM_MATCH): For undefined
Browse files Browse the repository at this point in the history
	symbol require exact match (these are PLTs).
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
	(_dl_ppc64_addr_sym_match): Likewise.
  • Loading branch information
Ulrich Drepper committed Aug 24, 2006
1 parent 93b53ca commit 2ac9ca7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
2006-08-24 Ulrich Drepper <drepper@redhat.com>

* sysdeps/generic/ldsodefs.h (DL_ADDR_SYM_MATCH): For undefined
symbol require exact match (these are PLTs).
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
(_dl_ppc64_addr_sym_match): Likewise.

[BZ #2683]
* elf/dl-addr.c (_dl_addr): Don't ignore all undefined symbols.
If symbol has a value use it.
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/generic/ldsodefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ typedef struct link_map *lookup_t;
/* On some architectures dladdr can't use st_size of all symbols this way. */
#define DL_ADDR_SYM_MATCH(L, SYM, MATCHSYM, ADDR) \
((ADDR) >= (L)->l_addr + (SYM)->st_value \
&& (((SYM)->st_size == 0 \
&& ((((SYM)->st_shndx == SHN_UNDEF || (SYM)->st_size == 0) \
&& (ADDR) == (L)->l_addr + (SYM)->st_value) \
|| (ADDR) < (L)->l_addr + (SYM)->st_value + (SYM)->st_size) \
&& ((MATCHSYM) == NULL || (MATCHSYM)->st_value < (SYM)->st_value))
Expand Down
4 changes: 2 additions & 2 deletions sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
Copyright (C) 2005 Free Software Foundation, Inc.
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -47,7 +47,7 @@ _dl_ppc64_addr_sym_match (const struct link_map *l, const ElfW(Sym) *sym,
return false;
}
}
else if (sym->st_size == 0)
else if (sym->st_shndx == SHN_UNDEF || sym->st_size == 0)
{
if (addr != value)
return false;
Expand Down

0 comments on commit 2ac9ca7

Please sign in to comment.