From: Martin Schwidefsky Date: Tue, 29 Jan 2002 11:14:35 +0000 (+0000) Subject: * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32 X-Git-Tag: binutils-2_12-branchpoint~243 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9cd9119027d232118717abfa26fb87a636e644c;p=platform%2Fupstream%2Fbinutils.git * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32 relocations with PC32 relocations for undefined or weak symbols. * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise. * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 169118e..832bce5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2002-01-29 Martin Schwidefsky + + * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32 + relocations with PC32 relocations for undefined or weak symbols. + * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise. + * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise. + 2002-01-28 Jason Thorpe * elfcore.h (elf_core_file_p): Improve comment for last change. diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 236e167..6e79199 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1108,7 +1108,9 @@ elf_i386_adjust_dynamic_symbol (info, h) if (h->plt.refcount <= 0 || (! info->shared && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)) + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 + && h->root.type != bfd_link_hash_undefweak + && h->root.type != bfd_link_hash_undefined)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index e5d07b1..0e7792f 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -1047,7 +1047,9 @@ elf_s390_adjust_dynamic_symbol (info, h) if (h->plt.refcount <= 0 || (! info->shared && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)) + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 + && h->root.type != bfd_link_hash_undefweak + && h->root.type != bfd_link_hash_undefined)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 51ab444..210e152 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -1026,7 +1026,9 @@ elf_s390_adjust_dynamic_symbol (info, h) if (h->plt.refcount <= 0 || (! info->shared && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)) + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 + && h->root.type != bfd_link_hash_undefweak + && h->root.type != bfd_link_hash_undefined)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic