[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / global-offset-table-position-arm.s
blobf3a7b3c442708a893c6bd358e0d7cd8c04dc6710
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabihf %s -o %t
3 // RUN: ld.lld --hash-style=sysv -shared %t -o %t2
4 // RUN: llvm-readobj --symbols %t2 | FileCheck %s
6 /// The ARM _GLOBAL_OFFSET_TABLE_ should be defined at the start of the .got
7 .globl a
8 .type a,%object
9 .comm a,4,4
11 .globl f
12 .type f,%function
14 ldr r2, .L1
15 .L0:
16 add r2, pc
17 .L1:
18 .word _GLOBAL_OFFSET_TABLE_ - (.L0+4)
19 .word a(GOT)
21 .global _start
22 .type _start,%function
23 _start:
24 bl f
25 .data
27 // CHECK: Name: _GLOBAL_OFFSET_TABLE_
28 // CHECK-NEXT: Value: 0x20268
29 // CHECK-NEXT: Size: 0
30 // CHECK-NEXT: Binding: Local
31 // CHECK-NEXT: Type: None
32 // CHECK-NEXT: Other [ (0x2)
33 // CHECK-NEXT: STV_HIDDEN (0x2)
34 // CHECK-NEXT: ]
35 // CHECK-NEXT: Section: .got