ARM/Thumb Interwork
Bhattacharya, Soubhik
soubhik_bhattacharya@mentorg.com
Wed Oct 29 10:47:00 GMT 2003
what about the functions that have a mix of arm/thumb? is there a
general rule to distinguish between arm/thumb code within such functions?
examples of such functions are
1. a function compiled with -mcallee-super-interworking
2. __<arm_func>_from_thumb
is there any other kind of function that can have mix of arm/thumb?
in case of 1, the function is marked as arm, and the thumb code begins
with a label of the form '.real_start_of<funcname>'.
in case of 2, the function is marked as thumb, and arm code begins with
a label of the form '__<arm_function_to_be_called>_change_to_arm'.
both the labels have type STT_NOTYPE in symtab. so is it the label name
that is being used to distinguish between arm/thumb? if yes, is there
any other label name that is used for this purpose?
the numeric value of STT_THUMB_FUNC is 13, right?
soubhik.
Richard Earnshaw wrote:
>>hi all,
>>
>>i'm working on a tool that reads and analyzes arm/thumb elf files
>>produced by gcc. to do this i need to be able to distinguish between arm
>>and thumb code fragments.
>>
>>arm eabi 2.0 extends generic elf standard to specify how to distinguish
>>between arm and thumb code fragments. however, it seems that the cross
>>gcc that i have does not follow arm eabi 2.0. so what is the convention
>>that gcc follows and how to learn about it?
>>
>>with the help of 'objdump', i cud see that calls to arm functions from
>>thumb code and vice versa is supported thru special wrapper functions
>>(__<func>_from_thumb and __<func>_from_arm). this technique will not
>>work for a function having a mix of arm and thumb code. are such
>>functions supported? what happens if a relocatable object is generated
>>with -mcallee-super-interworking?
>>
>
>
> GNU tools currently mark Thumb function symbols with type STT_THUMB_FUNC.
> I'm hoping that we will be able to migrate the GNU tools over to the new
> ARM ABI specs, but it's going to be a fair amount of work.
>
> R.
--
-0-1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7
Soubhik Bhattacharya
Member Technical Staff
Mentor Graphics
Hyderabad, India.
-0-1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7
More information about the Binutils
mailing list