[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / aarch64-got-relocations.s
bloba7745b05904db765c2cc048a2bae2e616fa136e1
1 # REQUIRES: aarch64
2 # RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-cloudabi %s -o %t.o
3 # RUN: ld.lld --hash-style=sysv -pie %t.o -o %t
4 # RUN: llvm-readobj -r %t | FileCheck %s
6 # If we're addressing a global relatively through the GOT, we still need to
7 # emit a relocation for the entry in the GOT itself.
8 # CHECK: Relocations [
9 # CHECK: Section (4) .rela.dyn {
10 # CHECK: 0x{{[0-9A-F]+}} R_AARCH64_RELATIVE - 0x{{[0-9A-F]+}}
11 # CHECK: }
12 # CHECK: ]
14 .globl _start
15 .type _start,@function
16 _start:
17 adrp x8, :got:i
18 ldr x8, [x8, :got_lo12:i]
20 .type i,@object
21 .comm i,4,4