[PATCH] D96164: [lld-macho] add code signature for native arm64 macOS

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 12:09:52 PST 2021


gkm added inline comments.


================
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 =
----------------
cynecx wrote:
> gkm wrote:
> > cynecx wrote:
> > > cynecx wrote:
> > > > Since we are currently hard-wiring sha256, we should just use the appropriate constant here.
> > > Oh crap. The constant is actually private. Nvm then. Perhaps add a comment then?
> > `SHA256::HASH_LENGTH` is defined as 20, which is 160 bits. I am confused.
> No? See https://github.com/llvm/llvm-project/blob/9fa11201618d8ad3a978815d90d3e64d8e0fa310/llvm/include/llvm/Support/SHA256.h#L65
> 
Better. I had a stale version of `SHA256.cpp` loaded in emacs. No clue where that came from.


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