[PATCH] D137879: [MachO][ObjCopy] Handle exports trie in LC_DYLD_INFO and LC_DYLD_EXPORTS_TRIE

Daniel Rodríguez Troitiño via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 17:19:23 PST 2022


drodriguez created this revision.
drodriguez added reviewers: jhenderson, alexander-shaposhnikov, MaskRay.
Herald added subscribers: StephenFan, abrachet, hiraditya.
Herald added a project: All.
drodriguez requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 <https://reviews.llvm.org/D134571>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137879

Files:
  llvm/lib/ObjCopy/MachO/MachOLayoutBuilder.cpp
  llvm/lib/ObjCopy/MachO/MachOReader.cpp
  llvm/lib/ObjCopy/MachO/MachOWriter.cpp
  llvm/test/tools/llvm-objdump/MachO/exports-trie-lc.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137879.474902.patch
Type: text/x-patch
Size: 10383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221112/ab6a9598/attachment.bin>


More information about the llvm-commits mailing list