This is the mail archive of the binutils@sources.redhat.com 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] | |
Note: To decrease the size of the object files, I disabled linking. Let me tell you if there are other things you may find useful.
Hmm - it is probably a case of ADS and GAS using different methods to distinguish between ARM and THUMB code in their object files. Please could you send me a *small* ADS object file which demonstrates this problem, so that I can try to find a fix ?
Cheers
Nick
#include <stdio.h>
int main() {
printf("Hello World\n");
return 0;
}
$ arm-elf-objdump -d Hello.o
Hello.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <main>:
0: a002b580 andge fp, r2, r0, lsl #11
00000004 <$b>:
4: fffef7ff swinv 0x00fef7ff
8: bd802000 stclt 0, cr2, [r0]
0000000c <$d>:
c: 6c6c6548 cfstr64vs mvdx6, [ip], -#288
10: 6f57206f swivs 0x0057206f
14: 0a646c72 beq 191b1e4 <$d+0x191b1d8>
18: 00000000 andeq r0, r0, r0
$ arm-elf-objdump -d -Mforce-thumb Hello.o
Hello.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <main>:
0: b580 push {r7, lr}
2: a002 add r0, pc, #8 (adr r0,c <$d>)
00000004 <$b>:
4: fffef7ff bl 0 <main>
8: 2000 mov r0, #0
a: bd80 pop {r7, pc}
0000000c <$d>:
c: 6548 str r0, [r1, #84]
e: 6c6c ldr r4, [r5, #68]
10: 206f mov r0, #111
12: 6f57 ldr r7, [r2, #116]
14: 6c72 ldr r2, [r6, #68]
16: 0a64 lsr r4, r4, #9
18: 0000 lsl r0, r0, #0
...
$ arm-elf-objdump -d -Mforce-thumb -Mreg-names-raw Hello.o
Hello.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <main>:
0: a002b580 andge r11, r2, r0, lsl #11
00000004 <$b>:
4: fffef7ff swinv 0x00fef7ff
8: bd802000 stclt 0, cr2, [r0]
0000000c <$d>:
c: 6c6c6548 cfstr64vs mvdx6, [r12], -#288
10: 6f57206f swivs 0x0057206f
14: 0a646c72 beq 191b1e4 <$d+0x191b1d8>
18: 00000000 andeq r0, r0, r0Attachment:
Hello-ARM.o
Description: Binary data
Attachment:
Hello-THUMB.o
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |