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: RFC: Add STB_GNU_SECONDARY


Quoting "H.J. Lu" <hjl.tools@gmail.com>:

We only have very few bits to in STB_XXX field.

Well, you could put the information somewhere else. E.g. a special relocation,
or a special elf section. Or you could mangle the information into
the section name in which the symbol is present.


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

It won't help us.

Maybe it wouldn't buy you more than the secondary symbols right now, but it would give a lot of flexibility to rearrange and combine different peoples ideas of link priority.

Another thought on symbols priorities: with pthread, using symbols of
different priorities is really a crutch - and it doesn't really work
that well for static linking.  What is really wanted is that
whenever one of a set of object files is linked in, a whole set of symbols
should be satisfied from a different place.  Maybe if, for a static pthread,
we'd put the pthread-aware I/O etc. into a special .text.pthread section
or somesuch, which would normally discarded, but had a mechanism to use them
if a special symbol is set (or used?) from an object file that provides
a pthread API function.


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