[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / riscv-pcrel-hilo-error.s
blob4dc80b5a5e716b0e43384db2566a71db9670e034
1 # REQUIRES: riscv
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: {{.*}}:(.text+0x4): 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
9 # time.
10 .weak external
11 external:
12 auipc sp,%pcrel_hi(external)
13 addi sp,sp,%pcrel_lo(external)