I am trying to mix ARM and THUMB instructions in my assembly code. For example, in the following code I try to use both modes:
.thumb @ .code 16
.section __TEXT,__text
.globl mySymbol1
mySymbol1:
....
.arm @ .code 32
.section __TEXT,__text
.globl mySymbol2
mySymbol2:
...
Now, as per my understanding when I compile this code into a library and run it through nm, mysymbol1
should show up as arm and mysymbol2
should show up as thumb, i.e,
0000xxxx (__TEXT,__text) external mySymbol1
0000yyyy (__TEXT,__text) external [Thumb] mySymbol2
But both are showing up as arm. What am I missing here? My assembler command is:
as -arch armv7 -o a.o a.s