This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Thumb, new EABI and STT_ARM_TFUNC
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 04 Jul 2005 13:44:04 +0100
- Subject: Thumb, new EABI and STT_ARM_TFUNC
Last November, a change was made to implement the new EABI that removes
the STT_ARM_TFUNC symbol type from generated objects, and instead sets the
low bit of the symbol address, leaving the symbol as STT_FUNC. This is
implemented in elf32-arm.c:elf32_arm_swap_symbol_out()
Unfortunately this, like other EABI changes, is not controllable by a
flag, and so the linker is now always producing symbols without
STT_ARM_TFUNC. (I haven't tried experimenting as to whether these changes
also break binary compatibility full stop, but being a "new ABI" that
seems possible).
This change is in the released binutils 2.16. However the latest stable
GDB release, 6.3 was released around the same time and its BFD does not
have that change since it was branched a little earlier. GDB uses the
STT_ARM_TFUNC symbol type to determine if a symbol is Thumb, so with
binutils 2.16, GDB treats all functions as ARM. When it comes to
debugging, particularly setting breakpoints, this causes one or two
problems :-).
Personally, I'm going to kludge GDB to notice the low bit being set in the
symbol address, so I'm okay. But I thought in general that old ABI
behaviours are normally preserved with a flag (or at worst a CPP macro)
for a while. Is this the only ABI incompatibility introduced? I'm prepared
to put in a little time to add such a flag if people think it should
really be there, but I'd need to know more about the ABI differences and
incompatibilities.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine