aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-05-01 10:22:46 +0000
committerAlan Modra <amodra@gmail.com>2003-05-01 10:22:46 +0000
commit81848ca0c80045dd202aec165bd56ede271f9325 (patch)
tree56753cd6c8a4eba77ca941dc8660ae3e22af1b5e /bfd/elf32-i386.c
parent130cacceca840fe1b78c6a1f67c37f6bab3f7fc6 (diff)
downloadgdb-81848ca0c80045dd202aec165bd56ede271f9325.zip
gdb-81848ca0c80045dd202aec165bd56ede271f9325.tar.gz
gdb-81848ca0c80045dd202aec165bd56ede271f9325.tar.bz2
* elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
weakdef sym has already been adjusted before treating it specially. * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted. * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 4f6bd80..060d66c 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -838,7 +838,19 @@ elf_i386_copy_indirect_symbol (bed, dir, ind)
edir->tls_type = eind->tls_type;
eind->tls_type = GOT_UNKNOWN;
}
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+
+ if (ELIMINATE_COPY_RELOCS
+ && ind->root.type != bfd_link_hash_indirect
+ && (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ dir->elf_link_hash_flags |=
+ (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+ else
+ _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
static int