[PATCH] D81768: [llvm-objcopy][MachO] Add support for LC_CODE_SIGNATURE
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 15 17:42:15 PDT 2020
smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.
LGTM from the Mach-O side.
================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp:222
+ // the Offset can be equal to zero by this time. It happens because of the
+ // covention that in such cases the file offsets specified by LC_SEGMENT start
+ // with zero (unlike the case of a relocatable object file).
----------------
Typo: covention -> convention
IIRC the reason for this convention is that dyld3 assumes the text segment starts at file offset 0, so the Mach-O header is counted as part of the text segment. See the comment about dyld3 in Writer.cpp in D75382.
================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp:234
// trie, data-in-code, symbol table, indirect symbol table, symbol table
// strings.
uint64_t NListSize = Is64Bit ? sizeof(MachO::nlist_64) : sizeof(MachO::nlist);
----------------
Does this comment need updating? It appears the code signature is at the end.
================
Comment at: llvm/tools/llvm-objcopy/MachO/Object.h:309
+ /// The index of LC_CODE_SIGNATURE load comamnd if present.
+ Optional<size_t> CodeSignatureCommandIndex;
----------------
Typo: comamnd -> command
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81768/new/
https://reviews.llvm.org/D81768
More information about the llvm-commits
mailing list