This is an archive of the discontinued LLVM Phabricator instance.

[MachO][ObjCopy] Handle exports trie in LC_DYLD_INFO and LC_DYLD_EXPORTS_TRIE
ClosedPublic

Authored by drodriguez on Nov 11 2022, 5:19 PM.

Details

Summary

The exports trie used to be pointed by the information in LC_DYLD_INFO,
but when chained fixups are present, the exports trie is pointed by
LC_DYLD_EXPORTS_TRIE instead.

Modify ObjCopy code to calculate the right offset and size needed
depending on the existence of LC_DYLD_INFO or LC_DYLD_EXPORTS_TRIE, read
the exports from either of those places, and write the export
information as pointed to either of those places.

Depends on D134571.

Diff Detail

Event Timeline

drodriguez created this revision.Nov 11 2022, 5:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2022, 5:19 PM
drodriguez requested review of this revision.Nov 11 2022, 5:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 11 2022, 5:19 PM
This revision is now accepted and ready to land.Nov 22 2022, 2:35 AM
This revision was landed with ongoing or failed builds.Nov 22 2022, 6:51 PM
This revision was automatically updated to reflect the committed changes.