This is the mail archive of the
mailing list for the binutils project.
[GOLD] common symbol resolution
- From: Jack Carter <jcarter at mips dot com>
- To: <binutils at sourceware dot org>
- Date: Fri, 11 May 2012 17:37:53 -0700
- Subject: [GOLD] common symbol resolution
I am running the Mips build of the gold linker on the "Common symbol
For the scenario when the .o has a COMMON symbol and the shared object
it is linked against has the symbol defined. I believe the a.out is
suppose to have the symbol as an UNDEF.
See http://www.scribd.com/doc/89505704/19/Symbol-Resolution #9
It looks to me that the gold linker is set up to either override the
target symbols attribute or keep it what it was. My output has the
symbol in the a.out becoming a DEF.
Is there a clean and easy way to just modify the output symbol
attributes by hand.
case WEAK_DEF * 16 + COMMON:
case DYN_DEF * 16 + COMMON:
case DYN_WEAK_DEF * 16 + COMMON:
// A common symbol does override a weak definition or a dynamic
and then calls
My first attempt to fix this was to hack Symbol_table::override(). That
got ugly quickly and I still wasn't changing the output attributes of
Is there an elegant method for modifying target symbol attributes or
should I just plow ahead.
ld/ld-new -o tmpdir/comm-data