[PATCH] D111164: Regenerate LC_CODE_SIGNATURE during llvm-objcopy operations

Nuri Amari via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 12:31:07 PDT 2021


nuriamari marked an inline comment as done.
nuriamari added a comment.

I expanded `updateLoadCommandIndexes` to update the `CodeSignatureCommandIndex` and `TextSegmentCommandIndex` values. In the new test, I check that the text segment size and offset values included in the code signature header are accurate. I also added asserts to make sure `TextSegmentCommandIndex` does in fact point to the correct load command, and not just another segment load command with identical size and offset. I was unable to get the text segment offset to change (it remains at 0 even after inserting more commands), but I think this is expected and so long as `TextSegmentCommandIndex` is accurate, the rest should also be accurate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111164/new/

https://reviews.llvm.org/D111164



More information about the llvm-commits mailing list