From: Paul Brook Date: Mon, 2 May 2005 03:12:21 +0000 (+0000) Subject: 2005-05-01 Paul Brook X-Git-Tag: msnyder-tracepoint-checkpoint-branchpoint~389 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a67b080b92d0a11fbd16fe00a896e8376f0ba9a1;p=platform%2Fupstream%2Fbinutils.git 2005-05-01 Paul Brook * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong definition has already been seen. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9027d77..28d8bee 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2005-05-01 Paul Brook + * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong + definition has already been seen. + +2005-05-01 Paul Brook + * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat R_ARM_PLT32 the same as R_ARM_PC24. (arm_add_to_rel): Ditto. diff --git a/bfd/elflink.c b/bfd/elflink.c index 23eafc0..7b33ae6 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -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