[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / arm-thumb-thunk-symbols.s
blobe79998c0d0aeb54d3d4fc2f1c6d77b859fafe0e5
1 // REQUIRES: arm
2 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
3 // RUN: ld.lld %t -o %t2
4 // RUN: llvm-readobj --symbols %t2 | FileCheck %s
5 // RUN: ld.lld --shared %t -o %t3
6 // RUN: llvm-readobj --symbols %t3 | FileCheck -check-prefix=CHECK-PI %s
8 // Check that the symbols generated for Thunks have the correct symbol type
9 // of STT_FUNC and the correct value of bit 0 (0 for ARM 1 for Thumb)
10 .syntax unified
11 .section .text.thumb, "ax", %progbits
12 .thumb
13 .balign 0x1000
14 .globl thumb_fn
15 .type thumb_fn, %function
16 thumb_fn:
17 b.w arm_fn
19 .section .text.arm, "ax", %progbits
20 .arm
21 .balign 0x1000
22 .globl arm_fn
23 .type arm_fn, %function
24 arm_fn:
25 b thumb_fn
27 // CHECK: Name: __Thumbv7ABSLongThunk_arm_fn
28 // CHECK-NEXT: Value: 0x22005
29 // CHECK-NEXT: Size: 10
30 // CHECK-NEXT: Binding: Local (0x0)
31 // CHECK-NEXT: Type: Function (0x2)
32 // CHECK: Name: __ARMv7ABSLongThunk_thumb_fn
33 // CHECK-NEXT: Value: 0x22010
34 // CHECK-NEXT: Size: 12
35 // CHECK-NEXT: Binding: Local (0x0)
36 // CHECK-NEXT: Type: Function (0x2)
38 // CHECK-PI: Name: __ThumbV7PILongThunk_arm_fn
39 // CHECK-PI-NEXT: Value: 0x12005
40 // CHECK-PI-NEXT: Size: 12
41 // CHECK-PI-NEXT: Binding: Local (0x0)
42 // CHECK-PI-NEXT: Type: Function (0x2)