2 // RUN
: llvm-mc
-arm-add-build-attributes
-filetype
=obj
-triple
=thumbv7a-none-linux-gnueabi
%s
-o
%t
3 // RUN
: echo
"SECTIONS { \
4 // RUN: .text 0x100000 : { *(SORT_BY_NAME(.text.*)) } \
6 // RUN
: ld.lld
--script
%t.script
%t -o
%t2
7 // RUN
: llvm-objdump
-d
%t2
--start-address
=0x100000 --stop-address
=0x100008 | FileCheck
--check-prefix
=CHECK1
%s
8 // RUN
: llvm-objdump
-d
%t2
--start-address
=0x1000004 --stop-address
=0x100000e | FileCheck
--check-prefix
=CHECK2
%s
12 // Test that linkerscript sorting does
not apply to Thunks
, we expect that the
13 // sort will reverse the order of sections presented here.
15 // Define
a function aligned on
a megabyte boundary
17 .section .text.\suff\(), "ax", %progbits
21 .type tfunc\suff\(), %function
43 // CHECK2
: <__Thumbv7ABSLongThunk_tfunc31
>:
44 // CHECK2-NEXT
: 1000004: f3ff
97fc b.w
0x2000000 <tfunc31
>
59 .section .text.00, "ax", %progbits
63 // Expect no range extension needed for tfunc01
and an extension needed for
68 // CHECK1-NEXT
: 100000: f0ff fffe
bl 0x200000 <tfunc01
>
69 // CHECK1-NEXT
: 100004: f2ff d7fe
bl 0x1000004 <__Thumbv7ABSLongThunk_tfunc31
>