diff --git a/lld/test/ELF/emulation-riscv.s b/lld/test/ELF/emulation-riscv.s --- a/lld/test/ELF/emulation-riscv.s +++ b/lld/test/ELF/emulation-riscv.s @@ -1,12 +1,12 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.o -# RUN: ld.lld %t.o -o %t +# RUN: %lld_rv32 %t.o -o %t # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefix=RV32 %s -# RUN: ld.lld -m elf32lriscv %t.o -o %t +# RUN: %lld_rv32 -m elf32lriscv %t.o -o %t # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefix=RV32 %s # RUN: echo 'OUTPUT_FORMAT(elf32-littleriscv)' > %t.script -# RUN: ld.lld %t.script %t.o -o %t +# RUN: %lld_rv32 %t.script %t.o -o %t # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefix=RV32 %s # RV32: ElfHeader { @@ -36,12 +36,12 @@ # RV32-NEXT: } # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o -# RUN: ld.lld %t.o -o %t +# RUN: %lld_rv64 %t.o -o %t # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefix=RV64 %s -# RUN: ld.lld -m elf64lriscv %t.o -o %t +# RUN: %lld_rv64 -m elf64lriscv %t.o -o %t # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefix=RV64 %s # RUN: echo 'OUTPUT_FORMAT(elf64-littleriscv)' > %t.script -# RUN: ld.lld %t.script %t.o -o %t +# RUN: %lld_rv64 %t.script %t.o -o %t # RUN: llvm-readobj --file-headers %t | FileCheck --check-prefix=RV64 %s # RV64: ElfHeader { diff --git a/lld/test/ELF/lit.local.cfg b/lld/test/ELF/lit.local.cfg --- a/lld/test/ELF/lit.local.cfg +++ b/lld/test/ELF/lit.local.cfg @@ -1 +1,12 @@ +# -*- Python -*- + config.suffixes = ['.test', '.s', '.ll', '.bat'] + +# Allow RISC-V LLD tests to run on GNU ld. This is useful for checking +# divergences in behavior. + +lld_rv32 = ('ld.lld') ### ('riscv32-unknown-linux-gnu-ld') +lld_rv64 = ('ld.lld') ### ('riscv64-unknown-linux-gnu-ld') + +config.substitutions.append(('%lld_rv32', lld_rv32)) +config.substitutions.append(('%lld_rv64', lld_rv64)) diff --git a/lld/test/ELF/riscv-attributes.s b/lld/test/ELF/riscv-attributes.s --- a/lld/test/ELF/riscv-attributes.s +++ b/lld/test/ELF/riscv-attributes.s @@ -1,9 +1,9 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.o -# RUN: ld.lld %t.o -o %t +# RUN: %lld_rv64 %t.o -o %t # RUN: llvm-readelf --arch-specific %t | FileCheck %s -# RUN: ld.lld %t.o %t.o -o %t2 +# RUN: %lld_rv64 %t.o %t.o -o %t2 # RUN: llvm-readelf --arch-specific %t2 | FileCheck %s # CHECK: BuildAttributes { diff --git a/lld/test/ELF/riscv-branch.s b/lld/test/ELF/riscv-branch.s --- a/lld/test/ELF/riscv-branch.s +++ b/lld/test/ELF/riscv-branch.s @@ -3,8 +3,8 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o -# RUN: ld.lld %t.rv32.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv64 +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv32 +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv64 # RUN: llvm-objdump -d %t.rv32 | FileCheck %s --check-prefix=CHECK-32 # RUN: llvm-objdump -d %t.rv64 | FileCheck %s --check-prefix=CHECK-64 # CHECK-32: 63 02 00 00 beqz zero, 0x110b8 @@ -12,8 +12,8 @@ # CHECK-64: 63 02 00 00 beqz zero, 0x11124 # CHECK-64: e3 1e 00 fe bnez zero, 0x11120 # -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0xffe --defsym bar=_start+4-0x1000 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0xffe --defsym bar=_start+4-0x1000 -o %t.rv64.limits +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+0xffe --defsym bar=_start+4-0x1000 -o %t.rv32.limits +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+0xffe --defsym bar=_start+4-0x1000 -o %t.rv64.limits # RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS-32 %s # RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS-64 %s # LIMITS-32: e3 0f 00 7e beqz zero, 0x120b2 @@ -21,13 +21,13 @@ # LIMITS-64: e3 0f 00 7e beqz zero, 0x1211e # LIMITS-64-NEXT: 63 10 00 80 bnez zero, 0x10124 -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+0x1000 --defsym bar=_start+4-0x1002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x1000 --defsym bar=_start+4-0x1002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s +# RUN: not %lld_rv32 %t.rv32.o --defsym foo=_start+0x1000 --defsym bar=_start+4-0x1002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s +# RUN: not %lld_rv64 %t.rv64.o --defsym foo=_start+0x1000 --defsym bar=_start+4-0x1002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s # ERROR-RANGE: relocation R_RISCV_BRANCH out of range: 2048 is not in [-2048, 2047]; references foo # ERROR-RANGE: relocation R_RISCV_BRANCH out of range: -2049 is not in [-2048, 2047]; references bar -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+1 --defsym bar=_start-1 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+1 --defsym bar=_start-1 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s +# RUN: not %lld_rv32 %t.rv32.o --defsym foo=_start+1 --defsym bar=_start-1 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s +# RUN: not %lld_rv64 %t.rv64.o --defsym foo=_start+1 --defsym bar=_start-1 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s # ERROR-ALIGN: improper alignment for relocation R_RISCV_BRANCH: 0x1 is not aligned to 2 bytes .global _start diff --git a/lld/test/ELF/riscv-call.s b/lld/test/ELF/riscv-call.s --- a/lld/test/ELF/riscv-call.s +++ b/lld/test/ELF/riscv-call.s @@ -3,8 +3,8 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o -# RUN: ld.lld %t.rv32.o --defsym foo=_start+8 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+8 --defsym bar=_start -o %t.rv64 +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+8 --defsym bar=_start -o %t.rv32 +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+8 --defsym bar=_start -o %t.rv64 # RUN: llvm-objdump -d %t.rv32 | FileCheck %s # RUN: llvm-objdump -d %t.rv64 | FileCheck %s # CHECK: 97 00 00 00 auipc ra, 0 @@ -12,8 +12,8 @@ # CHECK: 97 00 00 00 auipc ra, 0 # CHECK-NEXT: e7 80 80 ff jalr -8(ra) -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+8-0x80000800 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+8-0x80000800 -o %t.rv64.limits +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+8-0x80000800 -o %t.rv32.limits +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+8-0x80000800 -o %t.rv64.limits # RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS %s # RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS %s # LIMITS: 97 f0 ff 7f auipc ra, 524287 @@ -21,8 +21,8 @@ # LIMITS-NEXT: 97 00 00 80 auipc ra, 524288 # LIMITS-NEXT: e7 80 00 80 jalr -2048(ra) -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+8-0x80000801 -o %t -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+8-0x80000801 -o /dev/null 2>&1 | \ +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+8-0x80000801 -o %t +# RUN: not %lld_rv64 %t.rv64.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+8-0x80000801 -o /dev/null 2>&1 | \ # RUN: FileCheck --check-prefix=ERROR %s # ERROR: relocation R_RISCV_CALL out of range: 524288 is not in [-524288, 524287]; references foo # ERROR: relocation R_RISCV_CALL out of range: -524289 is not in [-524288, 524287]; references bar diff --git a/lld/test/ELF/riscv-elf-flags.s b/lld/test/ELF/riscv-elf-flags.s --- a/lld/test/ELF/riscv-elf-flags.s +++ b/lld/test/ELF/riscv-elf-flags.s @@ -1,7 +1,7 @@ # REQUIRES: riscv # RUN: echo -n "BLOB" > %t.binary -# RUN: ld.lld -m elf64lriscv -b binary %t.binary -o %t.out +# RUN: %lld_rv64 -m elf64lriscv -b binary %t.binary -o %t.out # RUN: llvm-readobj -h %t.out | FileCheck %s # CHECK: Flags [ diff --git a/lld/test/ELF/riscv-gp-no-sdata.s b/lld/test/ELF/riscv-gp-no-sdata.s --- a/lld/test/ELF/riscv-gp-no-sdata.s +++ b/lld/test/ELF/riscv-gp-no-sdata.s @@ -1,10 +1,10 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32.o -# RUN: ld.lld -pie %t.32.o -o %t.32 +# RUN: %lld_rv32 -pie %t.32.o -o %t.32 # RUN: llvm-readelf -s %t.32 | FileCheck --check-prefix=SYM %s # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64.o -# RUN: ld.lld -pie %t.64.o -o %t.64 +# RUN: %lld_rv64 -pie %t.64.o -o %t.64 # RUN: llvm-readelf -s %t.64 | FileCheck --check-prefix=SYM %s ## If there is an undefined reference to __global_pointer$ but .sdata doesn't diff --git a/lld/test/ELF/riscv-gp.s b/lld/test/ELF/riscv-gp.s --- a/lld/test/ELF/riscv-gp.s +++ b/lld/test/ELF/riscv-gp.s @@ -1,17 +1,17 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax %s -o %t.32.o -# RUN: ld.lld -pie %t.32.o -o %t.32 +# RUN: %lld_rv32 -pie %t.32.o -o %t.32 # RUN: llvm-readelf -s %t.32 | FileCheck --check-prefix=SYM32 %s # RUN: llvm-readelf -S %t.32 | FileCheck --check-prefix=SEC32 %s # RUN: llvm-objdump -d --print-imm-hex %t.32 | FileCheck --check-prefix=DIS32 %s -# RUN: not ld.lld -shared %t.32.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s +# RUN: not %lld_rv32 -shared %t.32.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+relax %s -o %t.64.o -# RUN: ld.lld -pie %t.64.o -o %t.64 +# RUN: %lld_rv64 -pie %t.64.o -o %t.64 # RUN: llvm-readelf -s %t.64 | FileCheck --check-prefix=SYM64 %s # RUN: llvm-readelf -S %t.64 | FileCheck --check-prefix=SEC64 %s # RUN: llvm-objdump -d %t.64 | FileCheck --check-prefix=DIS64 %s -# RUN: not ld.lld -shared %t.64.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s +# RUN: not %lld_rv64 -shared %t.64.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s ## __global_pointer$ = .sdata+0x800 = 0x39c0 # SEC32: [ 7] .sdata PROGBITS {{0*}}000031c0 diff --git a/lld/test/ELF/riscv-hi20-lo12.s b/lld/test/ELF/riscv-hi20-lo12.s --- a/lld/test/ELF/riscv-hi20-lo12.s +++ b/lld/test/ELF/riscv-hi20-lo12.s @@ -3,8 +3,8 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o -# RUN: ld.lld %t.rv32.o --defsym foo=0 --defsym bar=42 -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=0 --defsym bar=42 -o %t.rv64 +# RUN: %lld_rv32 %t.rv32.o --defsym foo=0 --defsym bar=42 -o %t.rv32 +# RUN: %lld_rv64 %t.rv64.o --defsym foo=0 --defsym bar=42 -o %t.rv64 # RUN: llvm-objdump -d %t.rv32 | FileCheck %s # RUN: llvm-objdump -d %t.rv64 | FileCheck %s # CHECK: 37 05 00 00 lui a0, 0 @@ -14,8 +14,8 @@ # CHECK-NEXT: 93 85 a5 02 addi a1, a1, 42 # CHECK-NEXT: 23 a5 b5 02 sw a1, 42(a1) -# RUN: ld.lld %t.rv32.o --defsym foo=0x7ffff7ff --defsym bar=0x7ffff800 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=0x7ffff7ff --defsym bar=0xffffffff7ffff800 -o %t.rv64.limits +# RUN: %lld_rv32 %t.rv32.o --defsym foo=0x7ffff7ff --defsym bar=0x7ffff800 -o %t.rv32.limits +# RUN: %lld_rv64 %t.rv64.o --defsym foo=0x7ffff7ff --defsym bar=0xffffffff7ffff800 -o %t.rv64.limits # RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS %s # RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS %s # LIMITS: 37 f5 ff 7f lui a0, 524287 @@ -25,7 +25,7 @@ # LIMITS-NEXT: 93 85 05 80 addi a1, a1, -2048 # LIMITS-NEXT: 23 a0 b5 80 sw a1, -2048(a1) -# RUN: not ld.lld %t.rv64.o --defsym foo=0x7ffff800 --defsym bar=0xffffffff7ffff7ff -o /dev/null 2>&1 | FileCheck --check-prefix ERROR %s +# RUN: not %lld_rv64 %t.rv64.o --defsym foo=0x7ffff800 --defsym bar=0xffffffff7ffff7ff -o /dev/null 2>&1 | FileCheck --check-prefix ERROR %s # ERROR: relocation R_RISCV_HI20 out of range: 524288 is not in [-524288, 524287]; references foo # ERROR: relocation R_RISCV_HI20 out of range: -524289 is not in [-524288, 524287]; references bar diff --git a/lld/test/ELF/riscv-ifunc-nonpreemptible.s b/lld/test/ELF/riscv-ifunc-nonpreemptible.s --- a/lld/test/ELF/riscv-ifunc-nonpreemptible.s +++ b/lld/test/ELF/riscv-ifunc-nonpreemptible.s @@ -1,15 +1,15 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32.o -# RUN: ld.lld -pie %t.32.o -o %t.32 -# RUN: ld.lld -pie %t.32.o -o %t.32-apply --apply-dynamic-relocs +# RUN: %lld_rv32 -pie %t.32.o -o %t.32 +# RUN: %lld_rv32 -pie %t.32.o -o %t.32-apply --apply-dynamic-relocs # RUN: llvm-readobj -r -x .got.plt %t.32 | FileCheck --check-prefixes=RELOC32,NO-APPLY-RELOC32 %s # RUN: llvm-readobj -r -x .got.plt %t.32-apply | FileCheck --check-prefixes=RELOC32,APPLY-RELOC32 %s # RUN: llvm-readelf -s %t.32 | FileCheck --check-prefix=SYM32 %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck --check-prefix=DIS32 %s # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64.o -# RUN: ld.lld -pie %t.64.o -o %t.64 -# RUN: ld.lld -pie %t.64.o -o %t.64-apply --apply-dynamic-relocs +# RUN: %lld_rv64 -pie %t.64.o -o %t.64 +# RUN: %lld_rv64 -pie %t.64.o -o %t.64-apply --apply-dynamic-relocs # RUN: llvm-readobj -r -x .got.plt %t.64 | FileCheck --check-prefixes=RELOC64,NO-APPLY-RELOC64 %s # RUN: llvm-readobj -r -x .got.plt %t.64-apply | FileCheck --check-prefixes=RELOC64,APPLY-RELOC64 %s # RUN: llvm-readelf -s %t.64 | FileCheck --check-prefix=SYM64 %s diff --git a/lld/test/ELF/riscv-jal.s b/lld/test/ELF/riscv-jal.s --- a/lld/test/ELF/riscv-jal.s +++ b/lld/test/ELF/riscv-jal.s @@ -3,8 +3,8 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o -# RUN: ld.lld %t.rv32.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv64 +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv32 +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+4 --defsym bar=_start -o %t.rv64 # RUN: llvm-objdump -d %t.rv32 | FileCheck %s --check-prefix=CHECK-32 # RUN: llvm-objdump -d %t.rv64 | FileCheck %s --check-prefix=CHECK-64 # CHECK-32: 6f 00 40 00 j 0x110b8 @@ -12,8 +12,8 @@ # CHECK-64: 6f 00 40 00 j 0x11124 # CHECK-64: ef f0 df ff jal 0x11120 -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0xffffe --defsym bar=_start+4-0x100000 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0xffffe --defsym bar=_start+4-0x100000 -o %t.rv64.limits +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+0xffffe --defsym bar=_start+4-0x100000 -o %t.rv32.limits +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+0xffffe --defsym bar=_start+4-0x100000 -o %t.rv64.limits # RUN: llvm-objdump -d %t.rv32.limits | FileCheck --check-prefix=LIMITS-32 %s # RUN: llvm-objdump -d %t.rv64.limits | FileCheck --check-prefix=LIMITS-64 %s # LIMITS-32: 6f f0 ff 7f j 0x1110b2 @@ -21,13 +21,13 @@ # LIMITS-64: 6f f0 ff 7f j 0x11111e # LIMITS-64-NEXT: ef 00 00 80 jal 0xfffffffffff11124 -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+0x100000 --defsym bar=_start+4-0x100002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x100000 --defsym bar=_start+4-0x100002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s +# RUN: not %lld_rv32 %t.rv32.o --defsym foo=_start+0x100000 --defsym bar=_start+4-0x100002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s +# RUN: not %lld_rv64 %t.rv64.o --defsym foo=_start+0x100000 --defsym bar=_start+4-0x100002 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-RANGE %s # ERROR-RANGE: relocation R_RISCV_JAL out of range: 524288 is not in [-524288, 524287]; references foo # ERROR-RANGE: relocation R_RISCV_JAL out of range: -524289 is not in [-524288, 524287]; references bar -# RUN: not ld.lld %t.rv32.o --defsym foo=_start+1 --defsym bar=_start+4+3 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+1 --defsym bar=_start+4+3 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s +# RUN: not %lld_rv32 %t.rv32.o --defsym foo=_start+1 --defsym bar=_start+4+3 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s +# RUN: not %lld_rv64 %t.rv64.o --defsym foo=_start+1 --defsym bar=_start+4+3 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR-ALIGN %s # ERROR-ALIGN: improper alignment for relocation R_RISCV_JAL: 0x1 is not aligned to 2 bytes # ERROR-ALIGN: improper alignment for relocation R_RISCV_JAL: 0x3 is not aligned to 2 bytes diff --git a/lld/test/ELF/riscv-pcrel-hilo-error.s b/lld/test/ELF/riscv-pcrel-hilo-error.s --- a/lld/test/ELF/riscv-pcrel-hilo-error.s +++ b/lld/test/ELF/riscv-pcrel-hilo-error.s @@ -1,6 +1,6 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o -# RUN: not ld.lld %t.o --defsym external=0 2>&1 | FileCheck %s +# RUN: not %lld_rv64 %t.o --defsym external=0 2>&1 | FileCheck %s # CHECK: error: R_RISCV_PCREL_LO12 relocation points to an absolute symbol: external diff --git a/lld/test/ELF/riscv-pcrel-hilo.s b/lld/test/ELF/riscv-pcrel-hilo.s --- a/lld/test/ELF/riscv-pcrel-hilo.s +++ b/lld/test/ELF/riscv-pcrel-hilo.s @@ -3,12 +3,12 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32-unknown-elf -mattr=-relax %s -o %t.rv32.o # RUN: llvm-mc -filetype=obj -triple=riscv64-unknown-elf -mattr=-relax %s -o %t.rv64.o -# RUN: ld.lld %t.rv32.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld %t.rv64.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv64 +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv32 +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv64 # RUN: llvm-objdump -d --no-show-raw-insn %t.rv32 | FileCheck %s # RUN: llvm-objdump -d --no-show-raw-insn %t.rv64 | FileCheck %s -# RUN: ld.lld -pie %t.rv32.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv32 -# RUN: ld.lld -pie %t.rv64.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv64 +# RUN: %lld_rv32 -pie %t.rv32.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv32 +# RUN: %lld_rv64 -pie %t.rv64.o --defsym foo=_start+12 --defsym bar=_start -o %t.rv64 # RUN: llvm-objdump -d --no-show-raw-insn %t.rv32 | FileCheck %s # RUN: llvm-objdump -d --no-show-raw-insn %t.rv64 | FileCheck %s # CHECK: auipc a0, 0 @@ -18,8 +18,8 @@ # CHECK-NEXT: addi a0, a0, -12 # CHECK-NEXT: sw zero, -12(a0) -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+12-0x80000800 -o %t.rv32.limits -# RUN: ld.lld %t.rv64.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+12-0x80000800 -o %t.rv64.limits +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+12-0x80000800 -o %t.rv32.limits +# RUN: %lld_rv64 %t.rv64.o --defsym foo=_start+0x7ffff7ff --defsym bar=_start+12-0x80000800 -o %t.rv64.limits # RUN: llvm-objdump -d --no-show-raw-insn %t.rv32.limits | FileCheck --check-prefix=LIMITS %s # RUN: llvm-objdump -d --no-show-raw-insn %t.rv64.limits | FileCheck --check-prefix=LIMITS %s # LIMITS: auipc a0, 524287 @@ -29,8 +29,8 @@ # LIMITS-NEXT: addi a0, a0, -2048 # LIMITS-NEXT: sw zero, -2048(a0) -# RUN: ld.lld %t.rv32.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+12-0x80000801 -o %t -# RUN: not ld.lld %t.rv64.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+12-0x80000801 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s +# RUN: %lld_rv32 %t.rv32.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+12-0x80000801 -o %t +# RUN: not %lld_rv64 %t.rv64.o --defsym foo=_start+0x7ffff800 --defsym bar=_start+12-0x80000801 -o /dev/null 2>&1 | FileCheck --check-prefix=ERROR %s # ERROR: relocation R_RISCV_PCREL_HI20 out of range: 524288 is not in [-524288, 524287]; references foo # ERROR: relocation R_RISCV_PCREL_HI20 out of range: -524289 is not in [-524288, 524287]; references bar diff --git a/lld/test/ELF/riscv-plt.s b/lld/test/ELF/riscv-plt.s --- a/lld/test/ELF/riscv-plt.s +++ b/lld/test/ELF/riscv-plt.s @@ -2,18 +2,18 @@ # RUN: echo '.globl bar, weak; .type bar,@function; .type weak,@function; bar: weak:' > %t1.s # RUN: llvm-mc -filetype=obj -triple=riscv32 %t1.s -o %t1.32.o -# RUN: ld.lld -shared %t1.32.o -soname=t1.32.so -o %t1.32.so +# RUN: %lld_rv32 -shared %t1.32.o -soname=t1.32.so -o %t1.32.so # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32.o -# RUN: ld.lld %t.32.o %t1.32.so -z separate-code -o %t.32 +# RUN: %lld_rv32 %t.32.o %t1.32.so -z separate-code -o %t.32 # RUN: llvm-readelf -S -s %t.32 | FileCheck --check-prefixes=SEC,NM %s # RUN: llvm-readobj -r %t.32 | FileCheck --check-prefix=RELOC32 %s # RUN: llvm-readelf -x .got.plt %t.32 | FileCheck --check-prefix=GOTPLT32 %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck --check-prefixes=DIS,DIS32 %s # RUN: llvm-mc -filetype=obj -triple=riscv64 %t1.s -o %t1.64.o -# RUN: ld.lld -shared %t1.64.o -soname=t1.64.so -o %t1.64.so +# RUN: %lld_rv64 -shared %t1.64.o -soname=t1.64.so -o %t1.64.so # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64.o -# RUN: ld.lld %t.64.o %t1.64.so -z separate-code -o %t.64 +# RUN: %lld_rv64 %t.64.o %t1.64.so -z separate-code -o %t.64 # RUN: llvm-readelf -S -s %t.64 | FileCheck --check-prefixes=SEC,NM %s # RUN: llvm-readobj -r %t.64 | FileCheck --check-prefix=RELOC64 %s # RUN: llvm-readelf -x .got.plt %t.64 | FileCheck --check-prefix=GOTPLT64 %s diff --git a/lld/test/ELF/riscv-reloc-64-pic.s b/lld/test/ELF/riscv-reloc-64-pic.s --- a/lld/test/ELF/riscv-reloc-64-pic.s +++ b/lld/test/ELF/riscv-reloc-64-pic.s @@ -1,6 +1,6 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o -# RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s +# RUN: not %lld_rv64 -shared %t.o -o /dev/null 2>&1 | FileCheck %s # CHECK: error: relocation R_RISCV_32 cannot be used against symbol 'a' diff --git a/lld/test/ELF/riscv-reloc-add.s b/lld/test/ELF/riscv-reloc-add.s --- a/lld/test/ELF/riscv-reloc-add.s +++ b/lld/test/ELF/riscv-reloc-add.s @@ -1,10 +1,10 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax %s -o %t.32.o -# RUN: ld.lld -pie %t.32.o -o %t.32 +# RUN: %lld_rv32 -pie %t.32.o -o %t.32 # RUN: llvm-readelf -x .rodata %t.32 | FileCheck --check-prefix=HEX %s # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+relax %s -o %t.64.o -# RUN: ld.lld -shared %t.64.o -o %t.64 +# RUN: %lld_rv64 -shared %t.64.o -o %t.64 # RUN: llvm-readelf -x .rodata %t.64 | FileCheck --check-prefix=HEX %s # HEX: section '.rodata': diff --git a/lld/test/ELF/riscv-reloc-copy.s b/lld/test/ELF/riscv-reloc-copy.s --- a/lld/test/ELF/riscv-reloc-copy.s +++ b/lld/test/ELF/riscv-reloc-copy.s @@ -1,15 +1,15 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 %p/Inputs/relocation-copy.s -o %t1.o -# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so +# RUN: %lld_rv32 -shared %t1.o -soname=t1.so -o %t1.so # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.o -# RUN: ld.lld %t.o %t1.so -o %t +# RUN: %lld_rv32 %t.o %t1.so -o %t # RUN: llvm-readobj -r %t | FileCheck --check-prefixes=REL,REL32 %s # RUN: llvm-nm -S %t | FileCheck --check-prefix=NM32 %s # RUN: llvm-mc -filetype=obj -triple=riscv64 %p/Inputs/relocation-copy.s -o %t1.o -# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so +# RUN: %lld_rv64 -shared %t1.o -soname=t1.so -o %t1.so # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o -# RUN: ld.lld %t.o %t1.so -o %t +# RUN: %lld_rv64 %t.o %t1.so -o %t # RUN: llvm-readobj -r %t | FileCheck --check-prefixes=REL,REL64 %s # RUN: llvm-nm -S %t | FileCheck --check-prefix=NM64 %s diff --git a/lld/test/ELF/riscv-reloc-got.s b/lld/test/ELF/riscv-reloc-got.s --- a/lld/test/ELF/riscv-reloc-got.s +++ b/lld/test/ELF/riscv-reloc-got.s @@ -1,9 +1,9 @@ # REQUIRES: riscv # RUN: echo '.globl b; b:' | llvm-mc -filetype=obj -triple=riscv32 - -o %t1.o -# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so +# RUN: %lld_rv32 -shared %t1.o -soname=t1.so -o %t1.so # RUN: llvm-mc -filetype=obj -triple=riscv32 -position-independent %s -o %t.o -# RUN: ld.lld %t.o %t1.so -o %t +# RUN: %lld_rv32 %t.o %t1.so -o %t # RUN: llvm-readelf -S %t | FileCheck --check-prefix=SEC32 %s # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC32 %s # RUN: llvm-nm %t | FileCheck --check-prefix=NM32 %s @@ -11,10 +11,10 @@ # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=DIS32 %s # RUN: echo '.globl b; b:' | llvm-mc -filetype=obj -triple=riscv64 - -o %t1.o -# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so +# RUN: %lld_rv64 -shared %t1.o -soname=t1.so -o %t1.so # RUN: llvm-mc -filetype=obj -triple=riscv64 -position-independent %s -o %t.o -# RUN: ld.lld %t.o %t1.so -o %t +# RUN: %lld_rv64 %t.o %t1.so -o %t # RUN: llvm-readelf -S %t | FileCheck --check-prefix=SEC64 %s # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC64 %s # RUN: llvm-nm %t | FileCheck --check-prefix=NM64 %s @@ -39,7 +39,7 @@ ## .got[1] = 0 (relocated by R_RISCV_32/64 at runtime) ## .got[2] = a (filled at link time) # HEX32: section '.got': -# HEX32: 0x0001220c ac210100 00000000 18320100 +# HEX32: 0x0001220c ac210100 00000000 18320100 # HEX64: section '.got': # HEX64: 0x00012358 98220100 00000000 00000000 00000000 diff --git a/lld/test/ELF/riscv-tls-gd.s b/lld/test/ELF/riscv-tls-gd.s --- a/lld/test/ELF/riscv-tls-gd.s +++ b/lld/test/ELF/riscv-tls-gd.s @@ -7,41 +7,41 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32.o # RUN: llvm-mc -filetype=obj -triple=riscv32 %t.s -o %t1.32.o -# RUN: ld.lld -shared -soname=t1.so %t1.32.o -o %t1.32.so +# RUN: %lld_rv32 -shared -soname=t1.so %t1.32.o -o %t1.32.so # RUN: llvm-mc -filetype=obj -triple=riscv32 %tga.s -o %tga.32.o ## rv32 GD -# RUN: ld.lld -shared %t.32.o %t1.32.o -o %t.32.so +# RUN: %lld_rv32 -shared %t.32.o %t1.32.o -o %t.32.so # RUN: llvm-readobj -r %t.32.so | FileCheck --check-prefix=GD32-REL %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32.so | FileCheck --check-prefix=GD32 %s ## rv32 GD -> LE -# RUN: ld.lld %t.32.o %t1.32.o %tga.32.o -o %t.32 +# RUN: %lld_rv32 %t.32.o %t1.32.o %tga.32.o -o %t.32 # RUN: llvm-readelf -r %t.32 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.32 | FileCheck --check-prefix=LE32-GOT %s -# RUN: ld.lld -pie %t.32.o %t1.32.o %tga.32.o -o %t.32 +# RUN: %lld_rv32 -pie %t.32.o %t1.32.o %tga.32.o -o %t.32 # RUN: llvm-readelf -r %t.32 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.32 | FileCheck --check-prefix=LE32-GOT %s ## rv32 GD -> IE -# RUN: ld.lld %t.32.o %t1.32.so %tga.32.o -o %t.32 +# RUN: %lld_rv32 %t.32.o %t1.32.so %tga.32.o -o %t.32 # RUN: llvm-readobj -r %t.32 | FileCheck --check-prefix=IE32-REL %s # RUN: llvm-readelf -x .got %t.32 | FileCheck --check-prefix=IE32-GOT %s # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64.o # RUN: llvm-mc -filetype=obj -triple=riscv64 %t.s -o %t1.64.o -# RUN: ld.lld -shared -soname=t1.so %t1.64.o -o %t1.64.so +# RUN: %lld_rv64 -shared -soname=t1.so %t1.64.o -o %t1.64.so # RUN: llvm-mc -filetype=obj -triple=riscv64 %tga.s -o %tga.64.o ## rv64 GD -# RUN: ld.lld -shared %t.64.o %t1.64.o -o %t.64.so +# RUN: %lld_rv64 -shared %t.64.o %t1.64.o -o %t.64.so # RUN: llvm-readobj -r %t.64.so | FileCheck --check-prefix=GD64-REL %s # RUN: llvm-objdump -d --no-show-raw-insn %t.64.so | FileCheck --check-prefix=GD64 %s ## rv64 GD -> LE -# RUN: ld.lld %t.64.o %t1.64.o %tga.64.o -o %t.64 +# RUN: %lld_rv64 %t.64.o %t1.64.o %tga.64.o -o %t.64 # RUN: llvm-readelf -r %t.64 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.64 | FileCheck --check-prefix=LE64-GOT %s -# RUN: ld.lld -pie %t.64.o %t1.64.o %tga.64.o -o %t.64 +# RUN: %lld_rv64 -pie %t.64.o %t1.64.o %tga.64.o -o %t.64 # RUN: llvm-readelf -r %t.64 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.64 | FileCheck --check-prefix=LE64-GOT %s ## rv64 GD -> IE -# RUN: ld.lld %t.64.o %t1.64.so %tga.64.o -o %t.64 +# RUN: %lld_rv64 %t.64.o %t1.64.so %tga.64.o -o %t.64 # RUN: llvm-readobj -r %t.64 | FileCheck --check-prefix=IE64-REL %s # RUN: llvm-readelf -x .got %t.64 | FileCheck --check-prefix=IE64-GOT %s diff --git a/lld/test/ELF/riscv-tls-ie.s b/lld/test/ELF/riscv-tls-ie.s --- a/lld/test/ELF/riscv-tls-ie.s +++ b/lld/test/ELF/riscv-tls-ie.s @@ -2,22 +2,22 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32.o ## rv32 IE -# RUN: ld.lld -shared %t.32.o -o %t.32.so +# RUN: %lld_rv32 -shared %t.32.o -o %t.32.so # RUN: llvm-readobj -r -d %t.32.so | FileCheck --check-prefix=IE32-REL %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32.so | FileCheck --check-prefixes=IE,IE32 %s ## rv32 IE -> LE -# RUN: ld.lld %t.32.o -o %t.32 +# RUN: %lld_rv32 %t.32.o -o %t.32 # RUN: llvm-readelf -r %t.32 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.32 | FileCheck --check-prefix=LE32-GOT %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck --check-prefixes=LE,LE32 %s # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64.o ## rv64 IE -# RUN: ld.lld -shared %t.64.o -o %t.64.so +# RUN: %lld_rv64 -shared %t.64.o -o %t.64.so # RUN: llvm-readobj -r -d %t.64.so | FileCheck --check-prefix=IE64-REL %s # RUN: llvm-objdump -d --no-show-raw-insn %t.64.so | FileCheck --check-prefixes=IE,IE64 %s ## rv64 IE -> LE -# RUN: ld.lld %t.64.o -o %t.64 +# RUN: %lld_rv64 %t.64.o -o %t.64 # RUN: llvm-readelf -r %t.64 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.64 | FileCheck --check-prefix=LE64-GOT %s # RUN: llvm-objdump -d --no-show-raw-insn %t.64 | FileCheck --check-prefixes=LE,LE64 %s diff --git a/lld/test/ELF/riscv-tls-ld.s b/lld/test/ELF/riscv-tls-ld.s --- a/lld/test/ELF/riscv-tls-ld.s +++ b/lld/test/ELF/riscv-tls-ld.s @@ -10,12 +10,12 @@ # RUN: llvm-mc -filetype=obj -triple=riscv32 -position-independent %s -o %t.32.o # RUN: llvm-mc -filetype=obj -triple=riscv32 %tga.s -o %tga.o ## rv32 LD -# RUN: ld.lld -shared %t.32.o -o %t.32.so +# RUN: %lld_rv32 -shared %t.32.o -o %t.32.so # RUN: llvm-readobj -r %t.32.so | FileCheck --check-prefix=LD32-REL %s # RUN: llvm-readelf -x .got %t.32.so | FileCheck --check-prefix=LD32-GOT %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32.so | FileCheck --check-prefixes=LD,LD32 %s ## rv32 LD -> LE -# RUN: ld.lld %t.32.o %tga.o -o %t.32 +# RUN: %lld_rv32 %t.32.o %tga.o -o %t.32 # RUN: llvm-readelf -r %t.32 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.32 | FileCheck --check-prefix=LE32-GOT %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck --check-prefixes=LE,LE32 %s @@ -23,12 +23,12 @@ # RUN: llvm-mc -filetype=obj -triple=riscv64 -position-independent %s -o %t.64.o # RUN: llvm-mc -filetype=obj -triple=riscv64 %tga.s -o %tga.o ## rv64 LD -# RUN: ld.lld -shared %t.64.o -o %t.64.so +# RUN: %lld_rv64 -shared %t.64.o -o %t.64.so # RUN: llvm-readobj -r %t.64.so | FileCheck --check-prefix=LD64-REL %s # RUN: llvm-readelf -x .got %t.64.so | FileCheck --check-prefix=LD64-GOT %s # RUN: llvm-objdump -d --no-show-raw-insn %t.64.so | FileCheck --check-prefixes=LD,LD64 %s ## rv64 LD -> LE -# RUN: ld.lld %t.64.o %tga.o -o %t.64 +# RUN: %lld_rv64 %t.64.o %tga.o -o %t.64 # RUN: llvm-readelf -r %t.64 | FileCheck --check-prefix=NOREL %s # RUN: llvm-readelf -x .got %t.64 | FileCheck --check-prefix=LE64-GOT %s # RUN: llvm-objdump -d --no-show-raw-insn %t.64 | FileCheck --check-prefixes=LE,LE64 %s diff --git a/lld/test/ELF/riscv-tls-le.s b/lld/test/ELF/riscv-tls-le.s --- a/lld/test/ELF/riscv-tls-le.s +++ b/lld/test/ELF/riscv-tls-le.s @@ -1,19 +1,19 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.32.o -# RUN: ld.lld %t.32.o -o %t.32 +# RUN: %lld_rv32 %t.32.o -o %t.32 # RUN: llvm-nm -p %t.32 | FileCheck --check-prefixes=NM %s # RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck --check-prefixes=LE %s -# RUN: ld.lld -pie %t.32.o -o %t.32 +# RUN: %lld_rv32 -pie %t.32.o -o %t.32 # RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck --check-prefixes=LE %s # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.64.o -# RUN: ld.lld %t.64.o -o %t.64 +# RUN: %lld_rv64 %t.64.o -o %t.64 # RUN: llvm-objdump -d --no-show-raw-insn %t.64 | FileCheck --check-prefixes=LE %s -# RUN: ld.lld -pie %t.64.o -o %t.64 +# RUN: %lld_rv64 -pie %t.64.o -o %t.64 # RUN: llvm-objdump -d --no-show-raw-insn %t.64 | FileCheck --check-prefixes=LE %s -# RUN: not ld.lld -shared %t.32.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error: +# RUN: not %lld_rv32 -shared %t.32.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error: # ERR: error: relocation R_RISCV_TPREL_HI20 against .LANCHOR0 cannot be used with -shared # ERR: error: relocation R_RISCV_TPREL_LO12_I against .LANCHOR0 cannot be used with -shared diff --git a/lld/test/ELF/riscv-undefined-weak.s b/lld/test/ELF/riscv-undefined-weak.s --- a/lld/test/ELF/riscv-undefined-weak.s +++ b/lld/test/ELF/riscv-undefined-weak.s @@ -2,11 +2,11 @@ # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o # RUN: llvm-readobj -r %t.o | FileCheck --check-prefix=RELOC %s -# RUN: ld.lld -e absolute %t.o -o %t +# RUN: %lld_rv64 -e absolute %t.o -o %t # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefixes=CHECK,PC %s # RUN: llvm-readelf -x .data %t | FileCheck --check-prefixes=HEX %s -# RUN: ld.lld -e absolute %t.o -o %t --export-dynamic +# RUN: %lld_rv64 -e absolute %t.o -o %t --export-dynamic # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefixes=CHECK,PLT %s # RUN: llvm-readelf -x .data %t | FileCheck --check-prefixes=HEX %s diff --git a/lld/test/ELF/riscv32-reloc-32-pic.s b/lld/test/ELF/riscv32-reloc-32-pic.s --- a/lld/test/ELF/riscv32-reloc-32-pic.s +++ b/lld/test/ELF/riscv32-reloc-32-pic.s @@ -1,6 +1,6 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.o -# RUN: ld.lld -shared %t.o -o %t.so +# RUN: %lld_rv32 -shared %t.o -o %t.so # RUN: llvm-nm %t.so | FileCheck --check-prefix=NM %s # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=RELOC %s diff --git a/lld/test/ELF/riscv64-reloc-64-pic.s b/lld/test/ELF/riscv64-reloc-64-pic.s --- a/lld/test/ELF/riscv64-reloc-64-pic.s +++ b/lld/test/ELF/riscv64-reloc-64-pic.s @@ -1,6 +1,6 @@ # REQUIRES: riscv # RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o -# RUN: ld.lld -shared %t.o -o %t.so +# RUN: %lld_rv64 -shared %t.o -o %t.so # RUN: llvm-nm %t.so | FileCheck --check-prefix=NM %s # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=RELOC %s