diff options
author | Alan Modra <amodra@bigpond.net.au> | 2003-07-21 00:24:10 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2003-07-21 00:24:10 +0000 |
commit | 6fef6d46e8fcc31c75a95ef3ba2e8fd3801815c1 (patch) | |
tree | 3977f1ef65c3d24e88ab86a98cfba0498bccf8e9 /bfd/elf32-ppc.c | |
parent | 5dd45a08a0712ae0db3bc89fd463a88a6945d384 (diff) | |
download | gdb-6fef6d46e8fcc31c75a95ef3ba2e8fd3801815c1.tar.gz |
* elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
(_bfd_elf_symbol_refs_local_p): ..this. Declare.
* elflink.c (_bfd_elf_symbol_refs_local_p): New function.
* elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
now done in _bfd_elf_symbol_refs_local_p.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r-- | bfd/elf32-ppc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index a2eec938b9e..ebf9dc05894 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -5175,9 +5175,8 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_REL14_BRNTAKEN: /* If these relocations are not to a named symbol, they can be handled right here, no need to bother the dynamic linker. */ - if (h == NULL - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 - || SYMBOL_REFERENCES_LOCAL (info, h)) + if (SYMBOL_REFERENCES_LOCAL (info, h) + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) break; /* fall through */ @@ -5207,8 +5206,7 @@ ppc_elf_relocate_section (bfd *output_bfd, || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak) && (MUST_BE_DYN_RELOC (r_type) - || (h != NULL - && !SYMBOL_CALLS_LOCAL (info, h)))) + || !SYMBOL_CALLS_LOCAL (info, h))) || (ELIMINATE_COPY_RELOCS && !info->shared && (input_section->flags & SEC_ALLOC) != 0 @@ -5263,8 +5261,7 @@ ppc_elf_relocate_section (bfd *output_bfd, if (skip) memset (&outrel, 0, sizeof outrel); - else if (h != NULL - && !SYMBOL_REFERENCES_LOCAL (info, h)) + else if (!SYMBOL_REFERENCES_LOCAL (info, h)) { unresolved_reloc = FALSE; outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); |