[PATCH] PR ld/18720: Properly merge non-default versioned symbol

Cary Coutant ccoutant@gmail.com
Mon Jul 27 17:51:00 GMT 2015


>>> To me, this defines foo and foo@FOO.  Both points to the same
>>> address.  This is how gas and ld work on symbol versioning for
>>> a long time.  I don't think we should change it just because gold
>>> behaves differently.
>>
>> OK, if you think that's correct behavior, you didn't answer why you
>> still expect the call from bar() to bind to the foo() in the DSO.
>
> It is because foo@FOO in main is hidden from DSO.  It
> will only be used by ld.so to resolve references to foo@FOO,
> not the naked "foo".

But you just said "this defines foo and foo@FOO"!

This whole business of combining Sun-style versioning with Gnu-style
versioning is a mess. The de facto behavior as implemented by gas and
gnu ld don't conform to any rational model that I can imagine.

-cary



More information about the Binutils mailing list