From: Paul Brook Date: Mon, 2 May 2005 03:12:46 +0000 (+0000) Subject: 2005-05-01 Paul Brook X-Git-Tag: binutils-csl-arm-2005q1b X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=520c5f6ca4bc5172512e8af4425793c852f9068a;p=thirdparty%2Fbinutils-gdb.git 2005-05-01 Paul Brook * bfd/elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong definition has already been seen. --- diff --git a/ChangeLog.csl b/ChangeLog.csl index c381846f044..6978c1cefac 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,8 @@ +2005-05-01 Paul Brook + + * bfd/elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a + strong definition has already been seen. + 2005-05-01 Paul Brook * bfd/elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat diff --git a/bfd/elflink.c b/bfd/elflink.c index 0554a0fdc32..37272c64edb 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -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