1 // RUN: llvm-mc -triple=aarch64-linux-gnu -filetype=obj -o - %s| llvm-readobj -r - | FileCheck %s 2 // RUN: llvm-mc -target-abi=ilp32 -triple=aarch64-linux-gnu -filetype=obj \ 3 // RUN: -o - %s| llvm-readobj -r - | FileCheck -check-prefix=CHECK-ILP32 %s 4 .text 5 // This tests that LLVM doesn't think it can deal with the relocation on the ADRP 6 // itself (even though it knows everything about the relative offsets of sym and 7 // the adrp instruction) because its value depends on where this object file's 8 // .text section gets relocated in memory. 9 adrp x0, sym 10 adrp x0, :got:sym 11 adrp x0, :gottprel:sym 12 adrp x0, :tlsdesc:sym 13 14 .global sym 15 sym: 16 // CHECK: R_AARCH64_ADR_PREL_PG_HI21 sym 17 // CHECK: R_AARCH64_ADR_GOT_PAGE sym 18 // CHECK: R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 sym 19 // CHECK: R_AARCH64_TLSDESC_ADR_PAGE21 sym 20 // CHECK-ILP32: R_AARCH64_P32_ADR_PREL_PG_HI21 sym 21 // CHECK-ILP32: R_AARCH64_P32_ADR_GOT_PAGE sym 22 // CHECK-ILP32: R_AARCH64_P32_TLSIE_ADR_GOTTPREL_PAGE21 sym 23 // CHECK-ILP32: R_AARCH64_P32_TLSDESC_ADR_PAGE21 sym 24