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: ld: switching symbol versions


On Fri, Sep 19, 2014 at 12:58 AM, Richard Henderson <rth@redhat.com> wrote:
>> NEW {
>>   my symbol;
>> }
>>
>> XXX {
>>   my_symbol;
>> }
>> And it seems to achieve what I need. Old programs that use the XXX ABI
>> work seamlessly and new programs link against the NEW ABI. My question
>> is, whether this behavior is random, or is the intended one and I can
>> rely on it.
> I'd be surprised if this really does what you want.
> You want the old symbols to be defined with non default versions
>   my_symbol@XXX
> and new symbols to be defined with default versions
>   my_symbol@@NEW

Correct.

> As far as I know from glibc development, this requires defining the symbols in
> this manner within the object files.  C.f.
>   glibc/sysdeps/unix/sysv/linux/xstat64.c
> which exports __xstat64 with both GLIBC_2_1 and GLIBC_2_2 versions.

Ok, so my understanding of your reply is that using the script file
there is no way to set the default version of the symbols, and the
fact that the first listed symbol was used by default is purely
incidental.

thanks,
Nikos


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