Don't use STT_ARM_TFUNC for final links

Paul Brook paul@codesourcery.com
Fri Nov 19 15:49:00 GMT 2004


On Thursday 18 November 2004 20:03, Richard Earnshaw wrote:
> > I made this change only for final links because it's less of
> > a compatibility
> > issue than for relocatable output.  For EABI objects,
> > presumably we should
> > do the same.  For non-EABI objects, I'm not sure if it should
> > be changed or
> > left alone; I have no idea what other tools are affected.
> > However, since
> > dynamic objects containing Thumb symbols did not work
> > properly before my
> > last change, I see no reason to conditionalize it.
>
> It needs to be done for objects too.  Without it, other toolchains can't
> consume GAS assembled objects that claim to conform to the EABI.
>
> There's no reason why the tricks shouldn't work on objects, so I think
> it should be done there too.
>
> As to the issue of backward compatibility, there shouldn't be a problem
> in binutils, they will just do the appropriate transformation when
> reading in object files.  As for other tools, then I think they are just
> going to have to get used to the new form.  It is better that functions
> really are tagged with STT_FUNC rather than a machine-dependent value,
> and Thumb-ness really isn't that special.

The attached patch does this. I pushed the transformation down into 
bfd_swap_symbol_{in,out} so that objcopy works. I had to make this change 
unconditionally because objcopy does not set the EABI version in e_flags 
until after the symbol table has been written out.

This means and ABI change for thumb objects.  New binutils/BFD will 
transparently handle both new and old format symbol tables.

Tested with cross to arm-none-eabi, and light testing on arm-linux.
Ok?

Paul

2004-11-19  Paul Brook  <paul@codesourcery.com>

bfd/
 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
 (elf32_arm_swap_symbol_out): New function.
 (elf32_arm_size_info): Add.
 (elf_backend_size_info): Define.
ld/
 * testsuite/ld-arm/mixed-lib.sym: Update for THUMB_FUNC change.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.thumb_eabi
Type: text/x-diff
Size: 3994 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20041119/80b4ce7c/attachment.bin>


More information about the Binutils mailing list