blob: 62172b173df39e2c5359dae6ec4702d5d0ae4a4a [file] [log] [blame]
Fangrui Songbcc0bd72019-06-01 11:01:261// REQUIRES: aarch64
2// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
3// RUN: ld.lld %t.o -o %t
4// RUN: llvm-readelf -r %t | FileCheck --check-prefix=RELOC %s
5// RUN: llvm-readelf -x .got %t | FileCheck %s
6
7// RELOC: no relocations
8
Fangrui Songf66b7672019-08-20 08:34:569// CHECK: 0x002201a0 00000000 00000000
Fangrui Songbcc0bd72019-06-01 11:01:2610
11 .globl _start
12_start:
13 adrp x8, :got:foo
14 ldr x8, [x8, :got_lo12:foo]
15 ldr w0, [x8]
16 ret
17
18 .weak foo