This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] PR ld/18720: Properly merge non-default versioned symbol
- From: Cary Coutant <ccoutant at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 27 Jul 2015 10:50:59 -0700
- Subject: Re: [PATCH] PR ld/18720: Properly merge non-default versioned symbol
- Authentication-results: sourceware.org; auth=none
- References: <20150726221550 dot GA16472 at gmail dot com> <CAJimCsGatEeKRRYcwYG_v-s5O=wE-2mbFjNkLiHzfi0RdCLu0A at mail dot gmail dot com> <CAMe9rOoGhZG=OxDV5tYwORqT7gwD_FzNArRe59N4uJxyrd6rsw at mail dot gmail dot com> <CAJimCsEh5LG-Q-z7Fq_wqWP8qqWog+wNewa4j=jhhLt_gKjCug at mail dot gmail dot com> <CAMe9rOqNt5K83eRS+3=ArVPWJW+XzyCLSZ2Sb3b4UMx7OsPhwg at mail dot gmail dot com> <CAJimCsH_M3ahgocMQ=sPZQ9Mqp2xE8-S0GyDsya9QGhSy0-2CA at mail dot gmail dot com> <CAMe9rOp0nTFRT75Q5VC9hzh0zdX=emjPxfyB5YW_vzBAM1KS6g at mail dot gmail dot com>
>>> 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.