1# thumb_bl_out_of_range_local.s 2# Test THUMB/THUMB-2 bl instructions just out of the branch range limits 3# and with local branch targets. 4 .syntax unified 5 6 .section .text.pre,"x" 7 8# Add padding so that target is just output of branch range. 9 .space 6 10 11 .code 16 12 .thumb_func 13 .type .Lbackward_target, %function 14.Lbackward_target: 15 bx lr 16 .size .Lbackward_target, .-.Lbackward_target 17 18 .text 19# Use 256-byte alignment so that we know where the stubs start. 20 .align 8 21 22# Define _start so that linker does not complain. 23 .global _start 24 .code 32 25 .align 2 26 .type _start, %function 27_start: 28 bx lr 29 .size _start, .-_start 30 31 .global _backward_test 32 .code 16 33 .thumb_func 34 .type _backward_test, %function 35_backward_test: 36 bl .Lbackward_target 37 .size _backward_test, .-_backward_test 38 39 .global _forward_test 40 .code 16 41 .thumb_func 42 .type _forward_test, %function 43_forward_test: 44 bl .Lforward_target 45 .size _forward_test, .-_forward_test 46 47# Switch back to ARM mode so that we can see stubs 48 .align 2 49 .code 32 50 51# Align stub table for address matching. 52 .align 8 53 54 .section .text.post,"x" 55 56# Add padding so that target is just out of branch range. 57 .space 12 58 59 .code 16 60 .thumb_func 61 .type .Lforward_target, %function 62.Lforward_target: 63 bx lr 64 .size .Lforward_target, .-.Lforward_target 65