aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-12-24 11:52:26 +1030
committerAlan Modra <amodra@gmail.com>2014-12-24 13:02:42 +1030
commitd5111a0e037c732029879829ca4d18ae2ae0d3e5 (patch)
tree430f2333eeb40e4175080e6698264edfabc5b076 /bfd/linker.c
parentYet another DEFINED testcase (diff)
downloadbinutils-gdb-d5111a0e037c732029879829ca4d18ae2ae0d3e5.tar.gz
binutils-gdb-d5111a0e037c732029879829ca4d18ae2ae0d3e5.tar.bz2
binutils-gdb-d5111a0e037c732029879829ca4d18ae2ae0d3e5.zip
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.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 92238101010..083a2504b67 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;