Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking error riscv64 #59

Open
jal-frezie opened this issue Aug 6, 2023 · 0 comments
Open

Linking error riscv64 #59

jal-frezie opened this issue Aug 6, 2023 · 0 comments

Comments

@jal-frezie
Copy link

If I attempt to build a big prolog executable on riscv64 I get an error from the linker:

System/bin/gmain.o: in function .Lcont24139': (.text+0x100222): relocation truncated to fit: R_RISCV_JAL against fail'
collect2: error: ld returned 1 exit status
compilation failed

This appears to be because the "j" instruction jump is limited to +-1MB offset. The code can be made to build OK by setting line 348 of riscv64_any.c to:

if (1)

thus avoiding the use of j altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant