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

Link error #1

Open
yuppox opened this issue May 21, 2020 · 3 comments
Open

Link error #1

yuppox opened this issue May 21, 2020 · 3 comments

Comments

@yuppox
Copy link

yuppox commented May 21, 2020

I'm trying to compile on Linux using the xPack gcc toolchain. However, I get a bunch of errors at the end of linking. I tried adding -fPIC to the cc flags and recompiling but that doesn't help.

[LD] vmx
/usr/bin/ld: ./vmm_trap.o: relocation R_X86_64_32S against symbol `offset_of_vmm_stack' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translation.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_arithmetic_immediate.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_branch.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_fence.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_memory_load.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_privileged_instr.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_arithmetic.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_multiplication_and_division.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_memory_store.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./csr_representation.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_amo.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./translate_unconditional_jump_intrs.o: relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output

@chillancezen
Copy link
Owner

hi @yuppox ,

use gcc 4 instead of higher version, I met the same issue with gcc 8.

@chillancezen
Copy link
Owner

I got a binary available here: https://github.com/chillancezen/Zelda.RISCV.Emulator/releases, you can simply download and run it.

@yuppox
Copy link
Author

yuppox commented May 21, 2020

Great! Thanks.

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

2 participants