2005-05-01 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Mon, 2 May 2005 03:12:21 +0000 (03:12 +0000)
committerPaul Brook <paul@codesourcery.com>
Mon, 2 May 2005 03:12:21 +0000 (03:12 +0000)
* elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
definition has already been seen.

bfd/ChangeLog
bfd/elflink.c

index 9027d7713116b815aeb0a7878c0ed71a232d042d..28d8bee5390de5479d1c7f2d23548003df94d5bf 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-01  Paul Brook  <paul@codesourcery.com>
+
+       * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
+       definition has already been seen.
+
 2005-05-01  Paul Brook  <paul@codesourcery.com>
 
        * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
index 23eafc09884f2c130d2ea66abcb6ba1771cd9a14..7b33ae67e3454aa6d92cce99e8a02b979904b794 100644 (file)
@@ -1078,6 +1078,13 @@ _bfd_elf_merge_symbol (bfd *abfd,
       || h->root.type == bfd_link_hash_undefined)
     *size_change_ok = TRUE;
 
+  /* Skip weak definitions of symbols that are already defined.  */
+  if (newdef && olddef && newweak && !oldweak)
+    {
+      *skip = TRUE;
+      return TRUE;
+    }
+
   /* NEWDYNCOMMON and OLDDYNCOMMON indicate whether the new or old
      symbol, respectively, appears to be a common symbol in a dynamic
      object.  If a symbol appears in an uninitialized section, and is
This page took 0.032572 seconds and 4 git commands to generate.