2 // RUN
: llvm-mc
-filetype
=obj
-triple arm-gnu-linux-eabi
-mcpu cortex-a7
-arm-add-build-attributes
%s
-o
%t.o
3 // RUN
: echo
"SECTIONS { . = 0x10000; .text : { *(.text) } /DISCARD/ : { *(.exit.text) } }" > %t.script
4 // RUN
: ld.lld
-T %t.script
%t.o
-o
%t.elf
5 // RUN
: llvm-readobj
-x
.ARM.exidx --sections %t.elf | FileCheck %s
7 // CHECK-
NOT: .exit.text
8 /// Expect
2 entries both CANTUNWIND as the
.ARM.exidx.exit.text
9 // should have been removed.
10 // CHECK
: Hex dump of section
'.ARM.exidx':
11 // CHECK-NEXT
: 0x00010000 10000000 01000000 10000000 01000000
13 /// The
/DISCARD
/ is evaluated after sections have been assigned to the
14 /// .ARM.exidx synthetic section. We must account for the /DISCARD/
15 .section .exit.text, "ax", %progbits
27 .type _start, %function
34 .section .text.__aeabi_unwind_cpp_pr0, "ax", %progbits
35 .global __aeabi_unwind_cpp_pr0
36 __aeabi_unwind_cpp_pr0
: