This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linker version script turning weak symbols into strong symbols


Kevin P. Fleming wrote:
> 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.

  Or just define a coding convention that you're going to use a standard
prefix for all functions that need this treatment?

    cheers,
      DAveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]