[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-exidx-partial-discard.s
blob770a811c1b83f69b81d002ba403f19b6c4702436
1 // REQUIRES: arm
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
16 .globl foo
17 .type foo, %function
18 foo:
19 .fnstart
20 bx lr
21 .save {r7, lr}
22 .setfp r7, sp, #0
23 .fnend
25 .text
26 .globl _start
27 .type _start, %function
28 _start:
29 .fnstart
30 bx lr
31 .cantunwind
32 .fnend
34 .section .text.__aeabi_unwind_cpp_pr0, "ax", %progbits
35 .global __aeabi_unwind_cpp_pr0
36 __aeabi_unwind_cpp_pr0:
37 bx lr