This is the mail archive of the binutils@sources.redhat.com 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: [arm] EABI annotation of thumb symbols.


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.

R.


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