This is the mail archive of the binutils@sourceware.org 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 THUMB_FUNC symbol type ?


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


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