H.J. Lu hjl.tools@gmail.com
Fri Apr 20 21:40:00 GMT 2012

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.


More information about the Binutils mailing list