2 // RUN
: llvm-mc
-filetype
=obj
--arm-add-build-attributes
-triple
=armv7a-none-linux-gnueabi
%s
-o
%t
3 // RUN
: ld.lld
--emit-relocs
%t -o
%t2
4 // RUN
: llvm-objdump
-s
--triple
=armv7a-none-linux-gnueabi
%t2 | FileCheck
%s
5 // RUN
: llvm-readelf
--relocs
%t2 | FileCheck
-check-prefix
=CHECK-RELOCS
%s
7 // RUN
: llvm-mc
-filetype
=obj
--arm-add-build-attributes
-triple
=armv7aeb-none-linux-gnueabi
-mcpu
=cortex-a8
%s
-o
%t
8 // RUN
: ld.lld
--emit-relocs
%t -o
%t2
9 // RUN
: llvm-objdump
-s
--triple
=armv7aeb-none-linux-gnueabi
%t2 | FileCheck
-check-prefix
=CHECK-EB
%s
10 // RUN
: llvm-readelf
--relocs
%t2 | FileCheck
-check-prefix
=CHECK-RELOCS
%s
12 // RUN
: ld.lld
--be8
--emit-relocs
%t -o
%t2
13 // RUN
: llvm-objdump
-s
--triple
=armv7aeb-none-linux-gnueabi
%t2 | FileCheck
-check-prefix
=CHECK-EB
%s
14 // RUN
: llvm-readelf
--relocs
%t2 | FileCheck
-check-prefix
=CHECK-RELOCS
%s
16 /// LLD does
not support
--emit-relocs for
.ARM.exidx sections as the relocations
17 /// from synthetic table entries won
't be represented. Given the known use cases
18 /// of --emit-relocs, relocating kernels, and binary analysis, the former doesn't
19 /// use exceptions
and the latter can derive the relocations from the table if
22 /// Will produce an ARM.exidx entry with inline unwinding instructions
23 .section .text.func1, "ax",%progbits
33 .section .text.func2, "ax",%progbits
34 /// A function with the same inline unwinding instructions
, expect merge.
43 .section .text.25, "ax", %progbits
51 .section .text.26, "ax", %progbits
60 .section .text.func3, "ax",%progbits
61 /// A function with the same inline unwinding instructions
, expect merge.
70 .section .text.__aeabi_unwind_cpp_pr0, "ax", %progbits
71 .global __aeabi_unwind_cpp_pr0
72 __aeabi_unwind_cpp_pr0
:
75 // CHECK
: Contents of section
.ARM.exidx:
76 // CHECK-NEXT
: 100d4
28000100 08849780 28000100 01000000
77 // CHECK-NEXT
: 100e4
28000100 08849780 24000100 01000000
78 // CHECK-NEXT
: 100f4 20000100 01000000
80 // CHECK-RELOCS-
NOT: Relocation section
'.rel.ARM.exidx'
82 // CHECK-EB
: Contents of section
.ARM.exidx:
83 // CHECK-EB-NEXT
: 100d4
00010028 80978408 00010028 00000001
84 // CHECK-EB-NEXT
: 100e4
00010028 80978408 00010024 00000001
85 // CHECK-EB-NEXT
: 100f4 00010020 00000001