aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-03-06 23:26:20 +0000
committerAlan Modra <amodra@gmail.com>2003-03-06 23:26:20 +0000
commita23b68450a5aa1317a36bd8fda8d7a507d02d8f6 (patch)
treebaa9cb890bf2a5429ad8e35e4a6c7d1b6300b51d /bfd/elf32-ppc.c
parent9ad120e9855466976133987db7b8d8be2817f845 (diff)
downloadgdb-a23b68450a5aa1317a36bd8fda8d7a507d02d8f6.zip
gdb-a23b68450a5aa1317a36bd8fda8d7a507d02d8f6.tar.gz
gdb-a23b68450a5aa1317a36bd8fda8d7a507d02d8f6.tar.bz2
* elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
(ppc_elf_adjust_dynamic_symbol): For weak symbols, copy ELF_LINK_NON_GOT_REF from weakdef. * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one. (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy ELF_LINK_NON_GOT_REF from weakdef. * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout. (elf_i386_adjust_dynamic_symbol): For weak symbols, copy ELF_LINK_NON_GOT_REF from weakdef.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 236ed90..d51c66c 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2455,7 +2455,7 @@ ppc_elf_create_dynamic_sections (abfd, info)
copying dynamic variables from a shared lib into an app's dynbss
section, and instead use a dynamic relocation to point into the
shared lib. */
-#define ELIMINATE_COPY_RELOCS 0
+#define ELIMINATE_COPY_RELOCS 1
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
@@ -2525,6 +2525,10 @@ ppc_elf_adjust_dynamic_symbol (info, h)
|| h->weakdef->root.type == bfd_link_hash_defweak);
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
+ if (ELIMINATE_COPY_RELOCS)
+ h->elf_link_hash_flags
+ = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
+ | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
return TRUE;
}