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: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 27 Jul 2015 10:53:44 -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> <CAJimCsG-XZ4s3BRToiA_BHioATS0tiEHNTomcJohmgpYFBU2VQ at mail dot gmail dot com>
On Mon, Jul 27, 2015 at 10:50 AM, Cary Coutant <email@example.com> wrote:
>>>> 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"!
Yes, only for link-time, not for run-time.