-
Notifications
You must be signed in to change notification settings - Fork 13.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
riscv: Make ELF flags RVE-aware #112567
riscv: Make ELF flags RVE-aware #112567
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Agh not my area of expertise at all r? compiler |
@@ -273,6 +273,11 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static | |||
e_flags |= elf::EF_RISCV_RVC; | |||
} | |||
|
|||
// Check if embedded is enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Check if embedded is enabled | |
// Specify if the embedded abi is used |
It seems that the embedded abi can be used even in programs that use the full RV32I instruction set1. This flag only determines if the embedded abi is used as I understand it2, not if the object file is limited to RV32E instructions.
Footnotes
☔ The latest upstream changes (presumably #114332) made this pull request unmergeable. Please resolve the merge conflicts. |
Looks to be fixed in #114332 |
This fixes the ELF header flags when targetting embedded RISC-V (rv32e and rv64e).
I think this is the only fix required for when LLVM merges D70401 and RVE targets can be added.