summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-04-20 05:37:05 +0000
committerAlan Modra <amodra@gmail.com>2000-04-20 05:37:05 +0000
commit1319985e96c6f9173507d44cd1c5b09543c347ae (patch)
tree575c0dc61fbce5e4eb586e8bc1933995dfc248f3 /bfd
parentba886e9d726a0eaf157c2fbdbb26d4cac0b37dbe (diff)
downloadbinutils-gdb-1319985e96c6f9173507d44cd1c5b09543c347ae.tar.gz
H.J's x86 fix for "nm -l" on shared libraries, applied to ppc too.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-i386.c4
-rw-r--r--bfd/elf32-ppc.c4
3 files changed, 12 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index dfea4b851af..9c1c3197a28 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2000-04-20 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
+ patch to symbols defined by a shared object.
+ * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
+
2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
K&R compiler fixes.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 90efba8dc9b..e4dbf9da096 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1291,7 +1291,9 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
sections against symbols defined externally
in shared libraries. We can't do anything
with them here. */
- || (input_section->flags & SEC_DEBUGGING) != 0)))
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
{
/* In these cases, we don't need the relocation
value. We check specially because in some
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 242cfb730ab..db5b2684248 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3043,7 +3043,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
It's here to avoid a crash when
generating a shared library with DWARF
debugging information. */
- || (input_section->flags & SEC_DEBUGGING) != 0)
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
&& (r_type == R_PPC_ADDR32
|| r_type == R_PPC_ADDR24
|| r_type == R_PPC_ADDR16