From 866b34001a0fa34cd47f17bcf5ddf76945033d03 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 25 Jun 2001 02:40:47 +0000 Subject: [PATCH] * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard relocs without ELF_LINK_HASH_DEF_DYNAMIC set. (elf_i386_relocate_section ): Remove redundant bfd_link_hash_defined, bfd_link_hash_defweak test. --- bfd/ChangeLog | 11 +++++++++-- bfd/elf32-i386.c | 11 +++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c23ed98e1d6..5528251c3f3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2001-06-25 Alan Modra + + * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard + relocs without ELF_LINK_HASH_DEF_DYNAMIC set. + (elf_i386_relocate_section ): Remove + redundant bfd_link_hash_defined, bfd_link_hash_defweak test. + 2001-06-24 H.J. Lu * cpu-i960.c (scan_960_mach): Don't modify const char *. Use @@ -5,8 +12,8 @@ 2001-06-23 H.J. Lu - * elf32-i386.c (elf_i386_relocate_section): Check the - ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined + * elf32-i386.c (elf_i386_relocate_section ): + Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the regular object file and treat the weak definition as the normal one. diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index a0ed38ae4fb..8e6c18a2bf0 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1193,8 +1193,9 @@ allocate_plt_and_got_and_discard_relocs (h, inf) && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0 || info->symbolic)) || (!info->shared - && ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) != 0 - || h->dynindx == -1))) + && (h->dynindx == -1 + || (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) != 0 + || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0))) { struct elf_i386_link_hash_entry *eh; struct elf_i386_dyn_relocs *c; @@ -1693,10 +1694,8 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, && h != NULL && h->dynindx != -1 && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 - && ((h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_DYNAMIC) != 0))) + && (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) { Elf_Internal_Rel outrel; boolean skip, relocate; -- 2.30.2