summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/aarch64-got-weak-undef.s
blob: 62172b173df39e2c5359dae6ec4702d5d0ae4a4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: ld.lld %t.o -o %t
// RUN: llvm-readelf -r %t | FileCheck --check-prefix=RELOC %s
// RUN: llvm-readelf -x .got %t | FileCheck %s

// RELOC: no relocations

// CHECK: 0x002201a0 00000000 00000000

        .globl  _start
_start:
        adrp    x8, :got:foo
        ldr     x8, [x8, :got_lo12:foo]
        ldr     w0, [x8]
        ret

        .weak   foo
OpenPOWER on IntegriCloud