This is the mail archive of the
mailing list for the binutils project.
Re: [arm] EABI annotation of thumb symbols.
On Tue, Nov 02, 2004 at 02:41:10PM +0000, Richard Earnshaw wrote:
> On Tue, 2004-11-02 at 14:22, Paul Brook wrote:
> > The current Arm abi identifies thumb function symbols by giving them type
> > STT_ARM_TFUNC.
> > The Arm EABI specifies that thumb function symbols should be identified by
> > setting the least significant bit of the address, and type STT_FUNC.
> > The patch below implements this. The main complication is that objdump -d
> > breaks. I added a new bfd function to get the real address of a symbol. This
> > seemed preferable to trying to mangle symbols while reading them in.
> > I'm open to alternative suggestions if people think this is the wrong way to
> > implement this.
> Another alternative, which might be less invasive on other parts of the
> tools is to have the ARM symbol slurp and write code translate the ABI
> v4 format into the STT_ARM_TFUNC internally when the symbol table is
> read and vice versa when it is written.
> Then the internal value of the symbol would always be the correct
> 'address' rather than the mangled address.
> Put another way, the LSB being set on the symbol in the object file is
> just a different way of encoding the STT_ARM_TFUNC feature.
I think that's an excellent idea. GDB still hasn't recovered from the
addition of mapping symbols to the symbol table; messing with the
addresses of Thumb symbols would probably confuse it beyond redemption.
[This was one of the last open issues I had questions about before
posting the Thumb PLT patches I've mentioned before. I will try to do
that Really, Really Soon, like this afternoon.]