arm_unaligned_reloc.s 736 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .syntax unified
  2. .global _start
  3. .type _start, %function
  4. .text
  5. _start:
  6. bx lr
  7. .size _start,.-_start
  8. .section .data.0,"aw",%progbits
  9. .align 12
  10. .type x, %object
  11. .size x, 4
  12. x:
  13. .word 1
  14. .section .data.1,"aw",%progbits
  15. .align 12
  16. # This causes following relocations to be unaligned.
  17. .global padding
  18. .type padding, %object
  19. .size padding, 1
  20. padding:
  21. .byte 0
  22. .global abs32
  23. .type abs32, %object
  24. .size abs32, 4
  25. abs32:
  26. # We use x + 1 instead so that addend is non-zero
  27. # The disassembler sometimes skips repeating
  28. # zeros and prints "..." instead.
  29. .word x + 1
  30. .global rel32
  31. .type rel32, %object
  32. .size rel32, 4
  33. rel32:
  34. .word x + 1 - .
  35. .global abs16
  36. .type abs16, %object
  37. .size abs16, 2
  38. abs16:
  39. .short x + 1
  40. .short 0