ARM/Thumb padding by gas
Christophe LYON
christophe.lyon@st.com
Thu Jan 29 13:32:00 GMT 2009
Hello,
If I assemble the attached ARM/Thumb code using arm-none-eabi-as, and
look at the object file with objdump, I can see:
Disassembly of section .text:
00000000 <app_func2>:
0: e12fff1e bx lr
4: 46c046c0 strbmi r4, [r0], r0, asr #13
8: 46c046c0 strbmi r4, [r0], r0, asr #13
c: 46c046c0 strbmi r4, [r0], r0, asr #13
Disassembly of section .far_thumb:
00000000 <lab1>:
0: e12fff1e bx lr
00000004 <lab2>:
4: 4770 bx lr
00000006 <lab3>:
6: 4770 bx lr
I don't understand why app_func2 is padded with Thumb NOPs while it is
written in ARM mode. If I remove the .thumb_func directive (after lab2),
then the padding is encoded in ARM.
I tried to understand where gas does this padding, but I couldn't find it.
Can someone give me some hints?
Thanks
Christophe.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo.s
URL: <https://sourceware.org/pipermail/binutils/attachments/20090129/e0dcf81f/attachment.ksh>
More information about the Binutils
mailing list