Linker version script turning weak symbols into strong symbols

Kevin P. Fleming kpfleming@digium.com
Tue May 26 19:04:00 GMT 2009


Dave Korn wrote:

>   So does the weak-symbol-plus-alias solution work for you just so long as you
> /don't/ declare the symbol local?

Yep, it works perfectly except for when the linker forces the symbol to
be local (via a version script), and I haven't found any syntax in the
version script that would leave that symbol alone without also exposing
'accidental' symbols that match the same pattern to being left in the
global namespace.

At this point I'm considering mangling the weak-alias symbol's name in
some way so that I can let the version script leave it 'global' and then
using a preprocessor macro in the code to call the mangled name; that
should work, but it's not the easiest thing in the world to implement.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@digium.com
Check us out at www.digium.com & www.asterisk.org



More information about the Binutils mailing list