ARM THUMB_FUNC symbol type ?
Daniel Jacobowitz
drow@false.org
Fri Jan 23 17:43:00 GMT 2009
On Fri, Jan 23, 2009 at 06:22:51PM +0100, Christophe LYON wrote:
> Hello,
>
> Considering the following sample code:
> .text
> .globl lib_func2
> .type lib_func2, %function
> .thumb_func
> lib_func2:
> bx lr
> .size lib_func2, . - lib_func2
>
> assembled with gas (arm-none-eabi), when I look at the symbol table,
> (readelf -s), I can see:
> 4: 00000000 0 NOTYPE LOCAL DEFAULT 1 $t
> 5: 00000001 2 FUNC LOCAL DEFAULT 1 lib_func2
>
> Why isn't lib_func2 of type THUMB_FUNC?
Because STT_ARM_TFUNC is obsolete; the EABI mandates STT_FUNC and an
odd st_value.
> I have tried looking at what gas does, and in arm_adjust_symtab() it does
> set st_info to STT_ARM_TFUNC. Is it lost afterwards?
See elf32_arm_swap_symbol_out.
--
Daniel Jacobowitz
CodeSourcery
More information about the Binutils
mailing list