]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2005-05-01 Paul Brook <paul@codesourcery.com> binutils-csl-arm-2005q1b
authorPaul Brook <paul@codesourcery.com>
Mon, 2 May 2005 03:12:46 +0000 (03:12 +0000)
committerPaul Brook <paul@codesourcery.com>
Mon, 2 May 2005 03:12:46 +0000 (03:12 +0000)
* bfd/elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a
strong definition has already been seen.

ChangeLog.csl
bfd/elflink.c

index c381846f0445d517fb6fb98dd793ae665f70c2d7..6978c1cefac52bda1dba811e40e5e1c959c79452 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-01  Paul Brook  <paul@codesourcery.com>
+
+       * bfd/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>
 
        * bfd/elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
index 0554a0fdc32b19c8a770bade8fb9d6844830e405..37272c64edbfa1647a2d100d71cfabff2dd85845 100644 (file)
@@ -1075,6 +1075,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