2 # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o
3 # RUN: not ld.lld %t.o --defsym external=0 2>&1 | FileCheck %s
5 # CHECK: error: R_RISCV_PCREL_LO12 relocation points to an absolute symbol: external
7 # We provide a dummy %pcrel_hi referred to by external to appease the
8 # assembler, but make external weak so --defsym can still override it at link
12 auipc sp
,%pcrel_hi
(external
)
13 addi sp
,sp
,%pcrel_lo
(external
)