-
Notifications
You must be signed in to change notification settings - Fork 153
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 dyld shared cache parsing #308
Conversation
This implements just enough to get the path and header offset of each contained image. It also adds a function to get an "any" File object for the image, so that the caller doesn't need to write code twice for 32 and 64 bit images and can instead benefit from the enum-based dynamic dispatch. This commit also adds two "examples", for printing the list of images in the cache and for dumping an object from inside the cache.
/// This can be used for parsing Mach-O images inside the dyld shared cache, | ||
/// where multiple images, located at different offsets, share the same address | ||
/// space. | ||
pub fn parse_at(data: R, offset: u64) -> Result<Self> { |
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.
Excellent!
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 read through all commits in detail and it all looks great. Much better than what was there before. Just need to address the delimiter / terminator comment.
Thanks a lot!
Use this for dyld cache image paths. The main benefit is avoiding an artificial limit for mapped data.
Add dyld shared cache parsing
Closes #268
Closes #305
cc @mstange