* linker.c (link_action): If an undefined reference follows an
authorIan Lance Taylor <ian@airs.com>
Mon, 21 Aug 1995 15:12:34 +0000 (15:12 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 21 Aug 1995 15:12:34 +0000 (15:12 +0000)
undefined weak reference, change the type to undefined.
* elflink.h (elf_link_add_archive_symbols): Don't record an
undefined weak reference as defined, in case it turns into a real
undefined reference later in the same archive.

bfd/ChangeLog
bfd/elflink.h

index 89b5e11475097ce17da2f3b1c3ec3cbac8597440..bd93fea8f9012a64a377fcbf476f9980f1f48042 100644 (file)
@@ -1,3 +1,11 @@
+Mon Aug 21 11:10:32 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * linker.c (link_action): If an undefined reference follows an
+       undefined weak reference, change the type to undefined.
+       * elflink.h (elf_link_add_archive_symbols): Don't record an
+       undefined weak reference as defined, in case it turns into a real
+       undefined reference later in the same archive.
+
 Thu Aug 17 16:29:09 1995  Ken Raeburn  <raeburn@kr-laptop.cygnus.com>
 
        * coff-sh.c (sh_relax_section): Cast value for used_by_bfd field
index 07ab9bbb9899bd75666c0170e2c8d3ca142e9084..b625ae09b331aa6f9fe59385c778b14d8e61a315 100644 (file)
@@ -155,7 +155,8 @@ elf_link_add_archive_symbols (abfd, info)
            continue;
          if (h->root.type != bfd_link_hash_undefined)
            {
-             defined[i] = true;
+             if (h->root.type != bfd_link_hash_undefweak)
+               defined[i] = true;
              continue;
            }