[PATCH] D96164: [lld-macho] add code signature for native arm64 macOS
Paul via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 11:09:30 PST 2021
cynecx added inline comments.
================
Comment at: lld/MachO/SyntheticSections.h:489
+public:
+ const uint8_t blockSizeShift = 12;
+ const ssize_t blockSize = (1 << blockSizeShift); // 4 KiB
----------------
constexpr?
================
Comment at: lld/MachO/SyntheticSections.h:491
+ const ssize_t blockSize = (1 << blockSizeShift); // 4 KiB
+ const size_t hashSize = 256 / 8;
+ const uint32_t blobHeadersSize =
----------------
Since we are currently hard-wiring sha256, we should just use the appropriate constant here.
================
Comment at: llvm/include/llvm/BinaryFormat/MachO.h:2151
+
+struct CS_CodeDirectory {
+ uint32_t magic; /* magic number (CSMAGIC_CODEDIRECTORY) */
----------------
Can we add some static_asserts for these structs to ensure that they have the correct size? (In case the compiler does weird things)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96164/new/
https://reviews.llvm.org/D96164
More information about the llvm-commits
mailing list