Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test.c :
- __attribute__((target("arm"))) int foo(void)
- {
- return 0;
- }
- int main(void)
- {
- return foo();
- }
- Disassembly :
- 00000000 <foo>:
- 0: 2000 movs r0, #0
- 2: 4770 bx lr
- 00000004 <main>:
- 4: b580 push {r7, lr}
- 6: af00 add r7, sp, #0
- 8: b082 sub sp, #8
- a: 2000 movs r0, #0
- c: 9001 str r0, [sp, #4]
- e: f7ff fffe bl 0 <foo>
- e: R_ARM_THM_CALL foo
- 12: b002 add sp, #8
- 14: bc80 pop {r7}
- 16: bc02 pop {r1}
- 18: 468e mov lr, r1
- 1a: 4770 bx lr
- Command :
- clang -nostdlib -target armv4t-none-eabi -mthumb -c test.c -o first.clang.o
- Command output :
- '+arm' is not a recognized feature for this target (ignoring feature)
- '+soft-float-abi' is not a recognized feature for this target (ignoring feature)
- '+arm' is not a recognized feature for this target (ignoring feature)
- '+soft-float-abi' is not a recognized feature for this target (ignoring feature)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement