3 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/obj.s -o %t/obj.o
5 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %t/dylib.s -o %t/dylib.o
6 # RUN: %lld -arch arm64 -dylib -o %t/libdylib.dylib %t/dylib.o
7 # RUN: %lld -arch arm64 %t/obj.o %t/libdylib.dylib -o %t/AdrpLdrGot
8 # RUN: llvm-objdump -d --macho %t/AdrpLdrGot | FileCheck %s
15 ## The referenced symbol is local
16 L1
: adrp x0
, _local@GOTPAGE
17 L2
: ldr x0
, [x0
, _local@GOTPAGEOFF
]
21 ## The referenced symbol is in a dylib
22 L3
: adrp x1
, _external@GOTPAGE
23 L4
: ldr x1
, [x1
, _external@GOTPAGEOFF
]
30 .loh AdrpLdrGot L1, L2
31 .loh AdrpLdrGot L3, L4