8000 read/macho: dyld cache slide information improvements by philipc · Pull Request #775 · gimli-rs/object · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

read/macho: dyld cache slide information improvements #775

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

Merged
merged 12 commits into from
Jun 2, 2025

Conversation

philipc
Copy link
Contributor
@philipc philipc commented Jun 1, 2025

See individual commits. Includes some fixes, API changes, and slide version 2 and 3 support.

philipc added 12 commits June 1, 2025 12:49
Note: I think this slide info is present since macOS 11.
I have tested on a dyld cache from macOS 11, but I don't have
an older dyld cache to test on.
The symbol table data is stored in the linkedit segment,
but that segment may be in a different subcache from the
one containing the image headers. This occurs for the
arm dyld cache in macOS 13.

MachOFile::parse_dyld_cache_image already handled this
correctly, but readobj doesn't use that.
This is leftover from before subcaches were supported.
Delete fields that are duplicates of information in DyldCache and
DyldFile. This makes the enum similar to DyldSubCacheSlice.
Also extract common fields of the mapping enum.
Print the cache header and mappings for every subcache, instead
of only the primary cache file.

Also print the mapping slide information headers.
I think the offset can be useful in itself, and the address
and file offset are easily derived from it.
Change the methods on DyldCacheSlidePointer5 to simply extract
the bitfields, and leave other interpretation to the parser.

Also move PtrauthKey to DyldRelocationAuth, since it is not
an externally defined format.
This will be useful when supporting more slide versions.
Also shorten its name.
This takes the place of wrapping it in Option.
Also shorten its name.
Having a separate versioned DyldCacheRelocationPageIterator
is a flexibility that is not required, and combining them
is simpler.
@philipc philipc merged commit 8130a96 into gimli-rs:master Jun 2, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0