[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / partition-exidx.s
blob807b61c4facf2c023ead96114faa41acf52af146
1 // Test that exidx output sections are created correctly for each partition.
3 // REQUIRES: arm
4 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
5 // RUN: ld.lld %t.o -o %t -shared --gc-sections
7 // RUN: llvm-objcopy --extract-main-partition %t %t0
8 // RUN: llvm-objcopy --extract-partition=part1 %t %t1
10 // Change upper case to lower case so that we can match unwind info (which is dumped
11 // in upper case) against program headers (which are dumped in lower case).
12 // RUN: llvm-readelf -l --unwind %t0 | tr A-Z a-z | FileCheck --ignore-case %s
13 // RUN: llvm-readelf -l --unwind %t1 | tr A-Z a-z | FileCheck --ignore-case %s
15 // CHECK: LOAD {{[^ ]*}} 0x{{0*}}[[TEXT_ADDR:[0-9a-f]+]] {{.*}} R E
16 // CHECK: EXIDX 0x{{0*}}[[EXIDX_OFFSET:[0-9a-f]+]] {{.*}} 0x00010 0x00010 R
18 // Each file should have one exidx section for its text section and one sentinel.
19 // CHECK: SectionOffset: 0x[[EXIDX_OFFSET]]
20 // CHECK-NEXT: Entries [
21 // CHECK-NEXT: Entry {
22 // CHECK-NEXT: Functionaddress: 0x[[TEXT_ADDR]]
23 // CHECK-NEXT: Model: CantUnwind
24 // CHECK-NEXT: }
25 // CHECK-NEXT: Entry {
26 // CHECK-NEXT: FunctionAddress:
27 // CHECK-NEXT: Model: CantUnwind
28 // CHECK-NEXT: }
29 // CHECK-NEXT: ]
31 .section .llvm_sympart,"",%llvm_sympart
32 .asciz "part1"
33 .4byte p1
35 .section .text.p0,"ax",%progbits
36 .globl p0
37 p0:
38 .fnstart
39 bx lr
40 .cantunwind
41 .fnend
43 .section .text.p1,"ax",%progbits
44 .globl p1
45 p1:
46 .fnstart
47 bx lr
48 .cantunwind
49 .fnend