3 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
4 # RUN: %lld -lSystem -arch arm64 -o %t %t.o
5 # RUN: llvm-objdump --macho -d --full-contents --section-headers %t | FileCheck %s
7 ## FIXME: Even though we have reserved a GOT slot for _foo due to
8 ## POINTER_TO_GOT, we should still be able to relax this GOT_LOAD reference to
11 # CHECK-NEXT: adrp x8, [[#]] ;
12 # CHECK-NEXT: ldr x8, [x8] ; literal pool symbol address: _foo
15 # CHECK: Idx Name Size VMA Type
16 # CHECK: [[#]] __got 00000008 0000000100004000 DATA
17 # CHECK: [[#]] __data 00000004 0000000100008000 DATA
19 ## The relocated data should contain the difference between the addresses of
20 ## __data and __got in little-endian form.
21 # CHECK: Contents of section __DATA,__data:
22 # CHECK-NEXT: 100008000 00c0ffff
28 ldr x8
, [x8
, _foo@GOTPAGEOFF
]