aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-06-25 02:40:47 +0000
committerAlan Modra <amodra@gmail.com>2001-06-25 02:40:47 +0000
commit866b34001a0fa34cd47f17bcf5ddf76945033d03 (patch)
tree77f1074e0ab88cd2c28b83e85565308b3beaa807 /bfd/elf32-i386.c
parentd14c409db38130b055f30200ecf3753f7e5f3d0a (diff)
downloadgdb-866b34001a0fa34cd47f17bcf5ddf76945033d03.zip
gdb-866b34001a0fa34cd47f17bcf5ddf76945033d03.tar.gz
gdb-866b34001a0fa34cd47f17bcf5ddf76945033d03.tar.bz2
* elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
relocs without ELF_LINK_HASH_DEF_DYNAMIC set. (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index a0ed38a..8e6c18a 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;