Skip to content

Commit 00c76f3

Browse files
committed
[ELF][test] Improve arm-exidx-output.s to test different output text sections
Delete arm-exidx-link.s which is now covered by arm-exidx-output.s Differential Revision: https://reviews.llvm.org/D76409
1 parent 7c1a687 commit 00c76f3

File tree

2 files changed

+20
-39
lines changed

2 files changed

+20
-39
lines changed

lld/test/ELF/arm-exidx-link.s

Lines changed: 0 additions & 25 deletions
This file was deleted.

lld/test/ELF/arm-exidx-output.s

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
11
// REQUIRES: arm
2-
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
3-
// RUN: ld.lld %t -o %t2
4-
// RUN: llvm-readobj --sections %t2 | FileCheck %s
2+
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
3+
// RUN: ld.lld %t.o -o %t
4+
// RUN: llvm-readelf -S %t | FileCheck %s
5+
6+
// RUN: echo 'SECTIONS { .text.f1 : { *(.text.f1) } .text.f2 : { *(.text.f2) } }' > %t.lds
7+
// RUN: ld.lld -T %t.lds %t.o -o %t1
8+
// RUN: llvm-readelf -S %t1 | FileCheck --check-prefix=MULTI %s
59

610
// Check that only a single .ARM.exidx output section is created when
711
// there are input sections of the form .ARM.exidx.<section-name>. The
812
// assembler creates the .ARM.exidx input sections with the .cantunwind
913
// directive
14+
15+
// CHECK: [Nr] Name Type {{.*}} Flg Lk
16+
// CHECK-NEXT: [ 0]
17+
// CHECK-NEXT: [ 1] .ARM.exidx ARM_EXIDX {{.*}} AL 2
18+
// CHECK-NEXT: [ 2] .text PROGBITS {{.*}} AX 0
19+
20+
// MULTI: [Nr] Name Type {{.*}} Flg Lk
21+
// MULTI-NEXT: [ 0]
22+
// MULTI-NEXT: [ 1] .ARM.exidx ARM_EXIDX {{.*}} AL 2
23+
// MULTI-NEXT: [ 2] .text.f1 PROGBITS {{.*}} AX 0
24+
// MULTI-NEXT: [ 3] .text.f2 PROGBITS {{.*}} AX 0
25+
// MULTI-NEXT: [ 4] .text PROGBITS {{.*}} AX 0
26+
1027
.syntax unified
1128
.section .text, "ax",%progbits
1229
.globl _start
@@ -31,14 +48,3 @@ f2:
3148
bx lr
3249
.cantunwind
3350
.fnend
34-
35-
// CHECK: Section {
36-
// CHECK: Name: .ARM.exidx
37-
// CHECK-NEXT: Type: SHT_ARM_EXIDX (0x70000001)
38-
// CHECK-NEXT: Flags [
39-
// CHECK-NEXT: SHF_ALLOC
40-
// CHECK-NEXT: SHF_LINK_ORDER
41-
// CHECK-NEXT: ]
42-
43-
// CHECK-NOT: Name: .ARM.exidx.text.f1
44-
// CHECK-NOT: Name: .ARM.exidx.text.f2

0 commit comments

Comments
 (0)