summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2002-01-29 11:14:35 +0000
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2002-01-29 11:14:35 +0000
commit21e32745594b64c1df25042c77e1d6d84e54560b (patch)
treee8350907db78b874c70c7fa747d89f7aed8c6c8a /bfd
parentaeda2b4a6169a4ee0f9191acf80fc3033ad3d820 (diff)
downloadgdb-21e32745594b64c1df25042c77e1d6d84e54560b.tar.gz
* 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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-i386.c4
-rw-r--r--bfd/elf32-s390.c4
-rw-r--r--bfd/elf64-s390.c4
4 files changed, 16 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 169118ee63c..832bce529e1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * 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 <thorpej@wasabisystems.com>
* elfcore.h (elf_core_file_p): Improve comment for last change.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 236e167911d..6e79199e099 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 e5d07b17d7f..0e7792fb022 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 51ab444c447..210e152b058 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