aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-06-24 00:36:47 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-06-24 00:36:47 +0000
commit62b7d3f1f1b805c22545bc5cafcd014655daf476 (patch)
treeac98b8fabe4029e305d7de712d826b5730cc77ba
parent78586f06cb16f4eabed0e74a4d841c0386b4ab76 (diff)
downloadgdb-62b7d3f1f1b805c22545bc5cafcd014655daf476.zip
gdb-62b7d3f1f1b805c22545bc5cafcd014655daf476.tar.gz
gdb-62b7d3f1f1b805c22545bc5cafcd014655daf476.tar.bz2
2001-06-23 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_relocate_section): Check the 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.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-i386.c7
2 files changed, 11 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 525acc4..7eeede2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2001-06-23 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_relocate_section): Check the
+ 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.
+
2001-06-23 Alan Modra <amodra@bigpond.net.au>
* elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index a628e0c..a0ed38a 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1693,9 +1693,10 @@ 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_defweak
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 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)))
{
Elf_Internal_Rel outrel;
boolean skip, relocate;