2001-06-23 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 24 Jun 2001 00:36:47 +0000 (00:36 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 24 Jun 2001 00:36:47 +0000 (00:36 +0000)
* 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.

bfd/ChangeLog
bfd/elf32-i386.c

index 525acc4..7eeede2 100644 (file)
@@ -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
index a628e0c..a0ed38a 100644 (file)
@@ -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;