-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
End of year refactoring #75
Conversation
@@ -147,7 +137,7 @@ fn compute_span_of_ram_sections(ram_entry: MemoryEntry, object: object::File) -> | |||
let mut found_a_section = false; | |||
for section in object.sections() { | |||
if let SectionFlags::Elf { sh_flags } = section.flags() { | |||
if sh_flags & elf::SHF_ALLOC as u64 != 0 { | |||
if (sh_flags & elf::SHF_ALLOC as u64) != 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.
Is it bit comparison here?
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.
It is. I was confused by that as well in the beginning, therefore I added the brackets.
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.
Yes this is nitty-gritty 🗡️ ! Should we add a comment to say what flags this check looks at?
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.
We should, but I don't know. SHF_ALLOC
says that "Section occupies memory during execution.".
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.
I'd prefer not to block this PR on this, but figure out what the check does and add a comment in a separate PR.
bors r=Dajamante |
Build succeeded: |
Some of the refactorings were triggered by clippy, others by just getting into the refactor mood.