-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
MachO::Sections function flag? implementation is wrong #423
Comments
Thanks for catching that. I'll make a fix PR in a moment. |
Oh, I think I see why this is -- we don't currently distinguish between the |
This two predicates replace the `Section#flag?` predicate, which has unintuitive behavior and is now deprecated. Closes #423.
#424 will address this. |
|
Yep, that's on the list of callsites to update. And yeah, I've marked |
* sections: add `Section#type?` and `Section#attribute?` This two predicates replace the `Section#flag?` predicate, which has unintuitive behavior and is now deprecated. Closes #423. * macho_file: fix `MachOFile#low_fileoff` Previously, the offset returned by this method could be incidentally wrong, depending on unrelated flags in each section. This changeset fixes the method so that only the section's type is checked, rather than the entire composite flag field. * load_commands: add SG_READ_ONLY Introduced by Mach-O at some point. * test: add another segment flags test * sections: rename constants Clarify that these are masks.
The SECTION_TYPE 0xff should be considered like
flags & SECTION_TYPE == flag
The text was updated successfully, but these errors were encountered: