25 lines · plain
1# REQUIRES: riscv2# RUN: llvm-mc -filetype=obj -triple=riscv32 %p/Inputs/relocation-copy.s -o %t1.o3# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so4# RUN: llvm-mc -filetype=obj -triple=riscv32 %s -o %t.o5# RUN: ld.lld %t.o %t1.so -o %t6# RUN: llvm-readobj -r %t | FileCheck --check-prefixes=REL,REL32 %s7# RUN: llvm-nm -S %t | FileCheck --check-prefix=NM32 %s8 9# RUN: llvm-mc -filetype=obj -triple=riscv64 %p/Inputs/relocation-copy.s -o %t1.o10# RUN: ld.lld -shared %t1.o -soname=t1.so -o %t1.so11# RUN: llvm-mc -filetype=obj -triple=riscv64 %s -o %t.o12# RUN: ld.lld %t.o %t1.so -o %t13# RUN: llvm-readobj -r %t | FileCheck --check-prefixes=REL,REL64 %s14# RUN: llvm-nm -S %t | FileCheck --check-prefix=NM64 %s15 16# REL: .rela.dyn {17# REL32-NEXT: 0x13210 R_RISCV_COPY x 0x018# REL64-NEXT: 0x13360 R_RISCV_COPY x 0x019# REL-NEXT: }20 21# NM32: 00013210 00000004 B x22# NM64: 0000000000013360 0000000000000004 B x23 24la a0, x25