-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add GNU Property Types #537
Conversation
Can you add constants for this value as well (it appears to be architecture specific, for example
It seems unusual to have a non-zero value for padding. |
yup, done.
|
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.
Thanks!
@@ -3,7 +3,7 @@ name = "object" | |||
version = "0.31.0" | |||
edition = "2018" | |||
exclude = ["/.github", "/testfiles"] | |||
keywords = ["object", "elf", "mach-o", "pe", "coff", "xcoff"] | |||
keywords = ["object", "elf", "mach-o", "pe", "coff"] |
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.
FYI, it looks like you squashed your commit into one of the existing commits.
/// GNU Property Type for BTI AArch64 | ||
pub const GNU_PROPERTY_AARCH64_FEATURE_1_BTI: u32 = 1 << 0; | ||
/// GNU Property Type for PAC AArch64 | ||
pub const GNU_PROPERTY_AARCH64_FEATURE_1_PAC: u32 = 1 << 0; |
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.
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/BinaryFormat/ELF.h#L1675 shows that there is a typo here. It should be 1 << 1
instead of a duplicate 1 << 0
. Should I upload a fix?
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.
Thanks for noticing that. I plan to do further work in this area and I'll fix that at the same time.
Hi, I want to learn more about how crates get updated. When can we expect this code to be merged into upstream Rust? |
For non-breaking changes, I do a release as needed. For breaking changes, I like to delay if possible since it causes other crates to need to update and do a release too. I'm in the process of doing a release now: #546. Since there aren't any breaking changes, it should be trivial to use this in upstream Rust. Also, in #541 I did some further work related to this PR which may interest you. |
Released in 0.31.1 |
Cool! I'm going to try to incorporate this in and work on a PR. Unless you already had one started? |
There's already rust-lang/rust#111413 for updating object. |
Use constants from object crate Replace hard-coded values with `GNU_PROPERTY_{X86|AARCH64}_FEATURE_1_AND` from the object crate. When working on [issue](rust-lang#103001) it was suggested that we moved these constants to the object crate . [PR](gimli-rs/object#537). Now that that the object crate has been updated [PR](rust-lang#111413) we can make this change.
Use constants from object crate Replace hard-coded values with `GNU_PROPERTY_{X86|AARCH64}_FEATURE_1_AND` from the object crate. When working on [issue](rust-lang#103001) it was suggested that we moved these constants to the object crate . [PR](gimli-rs/object#537). Now that that the object crate has been updated [PR](rust-lang#111413) we can make this change.
Adds GNU Property Type constants.
We are using them in Rust PR to emit notes.
A previous CL added a property constant CL.