Fangrui Song | bcc0bd7 | 2019-06-01 11:01:26 | [diff] [blame] | 1 | // 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 Song | f66b767 | 2019-08-20 08:34:56 | [diff] [blame] | 9 | // CHECK: 0x002201a0 00000000 00000000 |
Fangrui Song | bcc0bd7 | 2019-06-01 11:01:26 | [diff] [blame] | 10 | |
| 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 |