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
5
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: ]
13
14	.globl	_start
15	.type	_start,@function
16_start:
17	adrp	x8, :got:i
18	ldr	x8, [x8, :got_lo12:i]
19
20	.type	i,@object
21	.comm	i,4,4
22