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: [GOLD] Symbol target_flag for PowerPC64 localentry:0 tracking


> This patch provides a flag for target use in class Symbol, and
> modifies Sized_target::resolve to return whether the symbol has been
> resolved.  If not, normal processing continues.  I use this for
> PowerPC64 ELFv2 to keep track of whether a symbol has any definition
> with non-zero localentry, in order to disable --plt-localentry for
> that symbol.
>
> I know the right way to add target specific symbol fields is via a
> derived class and Sized_target::make_symbol, which would be easy to do
> for powerpc, but there are lots of holes in Symbol available.  So I
> thought I'd test the reaction to this patch before wasting another
> word per symbol.
>
> OK?

I think I'd prefer it if we pretended that your new flag was not, in
fact, target specific -- i.e., just name it something like
has_localentry. You'd still need the target-specific resolve(), due to
the way you have to check for the condition, but I can imagine another
target maybe wanting that flag someday. As you say, it's a lot cheaper
than deriving a new class.

(Ian was pretty prescient when he provided that target-specific
resolve hook, heretofore never used! I've considered removing it on
more than one occasion. (It's possible it was once used then removed,
but I haven't done the archaeology to find out.))

-cary


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