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

Michael Trent via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 14:47:29 PDT 2021


mtrent added a comment.

In D109972#3013610 <https://reviews.llvm.org/D109972#3013610>, @drodriguez wrote:

> This seems to be what happens when using Xcode's own strip (which is not based on LLVM), and it is something that we wanted to replicate in order to keep being compatible.

I changed Apple's `strip` to call out to an os-supplied library present in the Xcode toolchain in order to build the code directory section for Apple Silicon. I believe Apple's linker is using this same strategy. The os-supplied library is now a dylib, which  allows the details of the code directory to change without modifying the linker or strip, and it means the details may change between versions or maybe even be different between toolchains. I don't know how often this changes in practice.

That's something you should keep in mind while reverse-engineering this data structure for objcopy.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109972



More information about the llvm-commits mailing list