Advertisement
Guest User

Untitled

a guest
May 2nd, 2017
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. test.c :
  2. __attribute__((target("arm"))) int foo(void)
  3. {
  4. return 0;
  5. }
  6.  
  7. int main(void)
  8. {
  9. return foo();
  10. }
  11.  
  12. Disassembly :
  13.  
  14. 00000000 <foo>:
  15. 0: 2000 movs r0, #0
  16. 2: 4770 bx lr
  17.  
  18. 00000004 <main>:
  19. 4: b580 push {r7, lr}
  20. 6: af00 add r7, sp, #0
  21. 8: b082 sub sp, #8
  22. a: 2000 movs r0, #0
  23. c: 9001 str r0, [sp, #4]
  24. e: f7ff fffe bl 0 <foo>
  25. e: R_ARM_THM_CALL foo
  26. 12: b002 add sp, #8
  27. 14: bc80 pop {r7}
  28. 16: bc02 pop {r1}
  29. 18: 468e mov lr, r1
  30. 1a: 4770 bx lr
  31.  
  32. Command :
  33. clang -nostdlib -target armv4t-none-eabi -mthumb -c test.c -o first.clang.o
  34.  
  35. Command output :
  36. '+arm' is not a recognized feature for this target (ignoring feature)
  37. '+soft-float-abi' is not a recognized feature for this target (ignoring feature)
  38. '+arm' is not a recognized feature for this target (ignoring feature)
  39. '+soft-float-abi' is not a recognized feature for this target (ignoring feature)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement