bti-plt-so.s 670 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .global foo
  2. .type foo, %function
  3. foo:
  4. sub sp, sp, #16
  5. mov w0, 9
  6. str w0, [sp, 12]
  7. ldr w0, [sp, 12]
  8. add w0, w0, 4
  9. str w0, [sp, 12]
  10. nop
  11. add sp, sp, 16
  12. ret
  13. .size foo, .-foo
  14. .global bar
  15. .type bar, %function
  16. bar:
  17. sub sp, sp, #16
  18. mov w0, 9
  19. str w0, [sp, 12]
  20. ldr w0, [sp, 12]
  21. add w0, w0, 4
  22. str w0, [sp, 12]
  23. nop
  24. add sp, sp, 16
  25. ret
  26. .size bar, .-bar
  27. .section ".note.gnu.property", "a"
  28. .p2align 3
  29. .long 1f - 0f /* name length */
  30. .long 5f - 2f /* data length */
  31. .long 5 /* note type */
  32. 0: .asciz "GNU" /* vendor name */
  33. 1:
  34. .p2align 3
  35. 2: .long 0xc0000000 /* pr_type. */
  36. .long 4f - 3f /* pr_datasz. */
  37. 3:
  38. .long 0x1 /* BTI. */
  39. 4:
  40. .p2align 3
  41. 5: