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 /// LLD does
not support
--emit-relocs for
.ARM.exidx sections as the relocations
8 /// from synthetic table entries won
't be represented. Given the known use cases
9 /// of --emit-relocs, relocating kernels, and binary analysis, the former doesn't
10 /// use exceptions
and the latter can derive the relocations from the table if
13 /// Will produce an ARM.exidx entry with inline unwinding instructions
14 .section .text.func1, "ax",%progbits
24 .section .text.func2, "ax",%progbits
25 /// A function with the same inline unwinding instructions
, expect merge.
34 .section .text.25, "ax", %progbits
42 .section .text.26, "ax", %progbits
51 .section .text.func3, "ax",%progbits
52 /// A function with the same inline unwinding instructions
, expect merge.
61 .section .text.__aeabi_unwind_cpp_pr0, "ax", %progbits
62 .global __aeabi_unwind_cpp_pr0
63 __aeabi_unwind_cpp_pr0
:
66 // CHECK
: Contents of section
.ARM.exidx:
67 // CHECK-NEXT
: 100d4
28000100 08849780 28000100 01000000
68 // CHECK-NEXT
: 100e4
28000100 08849780 24000100 01000000
69 // CHECK-NEXT
: 100f4 20000100 01000000
71 // CHECK-RELOCS-
NOT: Relocation section
'.rel.ARM.exidx'