bug-1417.s 390 B

123456789101112131415161718192021
  1. ;;; Bug #1417: Branch wrong after linker relaxation
  2. ;;; http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1417&group_id=2424
  3. ;;;
  4. .sect .text
  5. .globl _start
  6. _start:
  7. tst table
  8. bne L1 ; Branch was adjusted but it must not
  9. jsr foo
  10. L1:
  11. .relax L2
  12. ldx #table ; Instruction removed
  13. bset 0,x #4 ; Changed to bset *table #4
  14. L2:
  15. rts
  16. foo:
  17. rts
  18. .sect .page0
  19. .globl table
  20. table: .long 0