diff options
author | Alan Modra <amodra@gmail.com> | 2003-03-06 23:26:20 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-03-06 23:26:20 +0000 |
commit | a23b68450a5aa1317a36bd8fda8d7a507d02d8f6 (patch) | |
tree | baa9cb890bf2a5429ad8e35e4a6c7d1b6300b51d /bfd/elf64-ppc.c | |
parent | 9ad120e9855466976133987db7b8d8be2817f845 (diff) | |
download | gdb-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/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 5963e97..1030e69 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -2545,7 +2545,7 @@ struct plt_entry 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 /* Section name for stubs is the associated section name plus this string. */ @@ -4518,6 +4518,10 @@ ppc64_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; } |