This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold's target->make_symbol()
From: Ian Lance Taylor <iant@google.com>
Date: Thu, 17 Apr 2008 09:06:44 -0700
> The description in the Sun Linkers and Libraries Guide is terse,
It's easier to understand by reading the BFD sparc elf backend :-)
> but it does seem like we want to take these symbols entirely out of
> the normal processing loop. Since we can assume that there won't be
> very many of them, perhaps the SPARC backend should manage them
> completely.
That's what I intended to do. Even if there were a lot, I could
keep track of them in a map<> or similar table.
> Still, I'm now thinking that we should not call the make_symbol hook
> for all symbols. We should only call it for symbols of unknown type.
Given the cases I've seen in the various BFD elf backends, this ought
to be sufficient.
> Of course, with this approach we will also need a target hook to add
> symbols to the symbol table at output time. And we would need
> something special to handle R_SPARC_REGISTER relocations against
> STT_REGISTER symbols.
Right.
> The other possibility I see would be to implement STT_REGISTER symbols
> by giving them a unique name. But that doesn't sound right to me.
No, don't do that.