From d5111a0e037c732029879829ca4d18ae2ae0d3e5 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 24 Dec 2014 11:52:26 +1030 Subject: [PATCH] Fix generic linker symbol output when weak is overridden by strong Yes, I know this also affects bfd_link_hash_indirect, but output of indirect and warning symbols looks quite broken anyway. * linker.c (_bfd_generic_link_output_symbols): Remove BSF_WEAK flag from bfd_link_hash_defined symbols. --- bfd/ChangeLog | 5 +++++ bfd/linker.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8e6fa09..7b0ad1d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-12-24 Alan Modra + + * linker.c (_bfd_generic_link_output_symbols): Remove BSF_WEAK + flag from bfd_link_hash_defined symbols. + 2014-12-23 Andrew Burgess * elf32-avr.c (bfd_elf_avr_final_write_processing): Don't set diff --git a/bfd/linker.c b/bfd/linker.c index 9223810..083a250 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -2136,7 +2136,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, /* fall through */ case bfd_link_hash_defined: sym->flags |= BSF_GLOBAL; - sym->flags &=~ BSF_CONSTRUCTOR; + sym->flags &=~ (BSF_WEAK | BSF_CONSTRUCTOR); sym->value = h->root.u.def.value; sym->section = h->root.u.def.section; break; -- 2.7.4