"relocation truncated to fit" error in riscv-tests

56 Views Asked by At

I am currently trying the multithreading tests in the mt folder of risc-tests. I gave the make command to compile the tests, but I am facing an error as shown below :

mt-vvadd.o: in function `barrier':
mt-vvadd.c:(.text+0x8): relocation truncated to fit: R_RISCV_HI20 against `count.1'
syscalls.o: in function `vprintfmt':
syscalls.c:(.text+0x4): relocation truncated to fit: R_RISCV_HI20 against `.L9'
syscalls.o: in function `main':
syscalls.c:(.text.startup+0x0): relocation truncated to fit: R_RISCV_HI20 against `.LC3'

When I did a bit of searching, I got to know about R_RISCV_HI20, which is related to a high 20-bit relocation used for 20-bit high parts of a 32-bit absolute address in the RISC-V architecture. The error suggests that the relocation is too large to fit into the available space. But I am not able to figure out ways to fix this error. Could someone help me with this?

0

There are 0 best solutions below