This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: RFC: Add STB_GNU_SECONDARY


On Fri, Apr 20, 2012 at 1:55 PM, Joern Rennecke <amylaar@spamcop.net> wrote:
> Quoting "H.J. Lu" <hjl.tools@gmail.com>:
>
>> Hi,
>>
>> We have a need to define a secondary symbol as backup in
>> case there isn't a primary one. ?Here is a proposal for
>> STB_GNU_SECONDARY. ?Any comments?
>
>
> If two levels of prevedence (ordinary and weak) are not enough, why will
> three levels be so much better?

The main issues with weak symbols are

1.  A global definition in shared object won't override a weak definition
in relocatable file.
2. A global definition in archive won't override a weak definition
in relocatable file.

> If you use a signed fractional or even floating-point precedence value,
> you have a lot more space to accomodate afterthoughts - above, below,
> and in-between in precedence to existing values.

We only have very few bits to in STB_XXX field.

> Even better, you could use symbolic tags, and have the linker script
> assign precedence values to these tags.

It won't help us.


-- 
H.J.


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