-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
No support for -mno-pic-data-is-text-relative -msingle-pic-base
options?
#1587
Comments
Correct:
Correct:
It does.
It doesn't seem to:
It doesn't accept the Arm specific options. And it doesn't seem to have any equivalent capability. Not all GCC target architectures support the same compiler options. Why not simply try compiling without those Arm specific options? |
Thank you @TommyMurphyTM1234 for the prompt reply. So I will take that RiscV linux toolchain support |
Yes, that's what the GCC documentation says.
I don't know. You might want to ask about this on the |
-mno-pic-data-is-text-relative -msingle-pic-base
options?
The existing RISC-V PIC scheme requires the GOT and local data be at a fixed offset from text. |
Thanks for the clarification @aswaterman. |
Closing this since it is something that needs to be dealt with in the relevant RISC-V ABI specification forum - here I think? And then any concomitant changes implied by the ABI changes/enhancements implemented in the upstream toolchain projects. |
Sorry for the delay in responding. Yes, the RISC-V ELF psABI spec is where these issues are discussed. |
Thanks a lot @aswaterman. 👍 |
Hello there,
I am porting a Cortex-m4 project to rv32, the project uses position independent code for downloadable app modules. The project uses GNU arm toolchain with
-fpic -fno-plt -mno-pic-data-is-text-relative -msingle-pic-base
options for compilation.I noticed that [issue#1521] and alike alredy explains that RiscV elf toolchain doesn't support PIC code generation and RiscV linux toolchain should be used instead.
Then I tried both
riscv32-unknown-linux-gnu-gcc
andriscv64-unknown-linux-musl-gcc
but found that they both:-fpic -fno-plt
options-mno-pic-data-is-text-relative -msingle-pic-base
options.I guess the first two are general GCC options and the last two are ARM specific options.
I am unsure if RiscV linux toolchain:
-fpic -fno-plt
options like ARM toolchain?-mno-pic-data-is-text-relative -msingle-pic-base
ARM toolchain? if no such options, then what is RiscV toolchain's behavior regarding these two options?The text was updated successfully, but these errors were encountered: