arm_thm_jump8.s 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # arm_thm_jump8.s
  2. # Test R_ARM_THM_JUMP8 relocations just within the branch range limits.
  3. .syntax unified
  4. .arch armv5te
  5. .section .text.pre,"x"
  6. # Add padding so that target is just in branch range.
  7. .space 8
  8. .global _backward_target
  9. .code 16
  10. .thumb_func
  11. .type _backword_target, %function
  12. _backward_target:
  13. bx lr
  14. .size _backward_target, .-_backward_target
  15. .text
  16. # Define _start so that linker does not complain.
  17. .global _start
  18. .code 32
  19. .align 2
  20. .type _start, %function
  21. _start:
  22. bx lr
  23. .size _start, .-_start
  24. .global _backward_test
  25. .code 16
  26. .thumb_func
  27. .type _backward_test, %function
  28. _backward_test:
  29. beq.n _backward_target
  30. .size _backward_test, .-_backward_test
  31. .global _forward_test
  32. .code 16
  33. .thumb_func
  34. .type _forward_test, %function
  35. _forward_test:
  36. beq.n _forward_target
  37. .size _forward_test, .-_forward_test
  38. .section .text.post,"x"
  39. # Add padding so that target is just in branch range.
  40. .space 8
  41. .global _forward_target
  42. .code 16
  43. .thumb_func
  44. .type _forward_target, %function
  45. _forward_target:
  46. bx lr
  47. .size _forward_target, .-_forward_target