[PATCH] D133974: [objcopy] Fix order of Mach-O LINKEDIT pieces during layout
Daniel RodrÃguez Troitiño via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 19:16:46 PDT 2022
drodriguez added inline comments.
================
Comment at: llvm/lib/ObjCopy/MachO/MachOLayoutBuilder.cpp:276
+ uint64_t StartOfCodeSignature = Offset;
uint32_t CodeSignatureSize = 0;
if (O.CodeSignatureCommandIndex) {
----------------
alexander-shaposhnikov wrote:
> just in case (didn't have a minute to check myself) - is uint32_t used here (and on line 246) by design ?
> (arithmetic operations with Offset are done on uint64_t anyway, uint32_t will be zero-extended to uint64_t)
Maybe because `linkedit_data_command.datasize` is a `uint32_t`?
I have not changed this one, since I think it is trying to match the underlying format. I have changed the parameter of the lambda, since it seems to take its value from a lot of `size()`, which seems to be `size_t`, not `uint32_t`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133974/new/
https://reviews.llvm.org/D133974
More information about the llvm-commits
mailing list