This is the mail archive of the
binutils@sourceware.org
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 12:31:22 -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> <CAJimCsGPkgdc=6=gOeQR1o7PLO0fZ-hK6h7AJxwW5ukH5o9eBQ at mail dot gmail dot com>
On Mon, Jul 27, 2015 at 12:27 PM, Cary Coutant <ccoutant@gmail.com> wrote:
>>> To me, if you're going to allow the two names to be the same, it
>>> should define only one symbol. That would allow a library developer to
>>> maintain multiple versions of a function in separate source files,
>>> like this:
>>
>> The current gas/linker provide flexibility to support both ways.
>
> No, it doesn't. If you try to link foo-orig.o, foo-ver1.o, and
> foo-ver2.o, you'll get multiply-defined symbol errors for "foo".
>
That is how GNU symbol version works. You can improve it only without
breaking ld testsuite.
--
H.J.