summaryrefslogtreecommitdiffstats
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-05-13 14:09:51 +0000
committerAlan Modra <amodra@gmail.com>2003-05-13 14:09:51 +0000
commit586119b38f8802cb7ba21961aaa381dd6061c3b2 (patch)
treec88ea86487b39f8f22cca48d6eb8dfbbac836851 /bfd/elf32-i386.c
parent04e534c39ae6d32ec36643b0f3c71a2fa47b4ce8 (diff)
downloadppe42-binutils-586119b38f8802cb7ba21961aaa381dd6061c3b2.tar.gz
ppe42-binutils-586119b38f8802cb7ba21961aaa381dd6061c3b2.zip
* elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check. * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete. (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check. (ppc_elf_relocate_section): Likewise. * elf64-ppc.c (allocate_dynrelocs): Likewise. (ppc64_elf_relocate_section): Likewise. Use for .got relocs too. (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt relocs need no other types. * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check. (elf_i386_relocate_section): Likewise. Use for .got relocs too. (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for .got relocs.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 320e985983..8fbe8a1c60 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1679,9 +1679,7 @@ allocate_dynrelocs (h, inf)
if (info->shared)
{
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
- || info->symbolic))
+ if (SYMBOL_REFERENCES_LOCAL (info, h))
{
struct elf_i386_dyn_relocs **pp;
@@ -2305,10 +2303,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
dyn = htab->elf.dynamic_sections_created;
if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
|| (info->shared
- && (info->symbolic
- || h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ && SYMBOL_REFERENCES_LOCAL (info, h))
|| (ELF_ST_VISIBILITY (h->other)
&& h->root.type == bfd_link_hash_undefweak))
{
@@ -2439,10 +2434,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|| h->root.type != bfd_link_hash_undefweak)
&& (r_type != R_386_PC32
|| (h != NULL
- && h->dynindx != -1
- && (! info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ && !SYMBOL_REFERENCES_LOCAL (info, h))))
|| (ELIMINATE_COPY_RELOCS
&& !info->shared
&& h != NULL
@@ -3172,10 +3164,7 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym)
The entry in the global offset table will already have been
initialized in the relocate_section function. */
if (info->shared
- && (info->symbolic
- || h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ && SYMBOL_REFERENCES_LOCAL (info, h))
{
BFD_ASSERT((h->got.offset & 1) != 0);
rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
OpenPOWER on IntegriCloud