[llvm] [ObjCopy] Respect requirements of LC_ENCRYPTION_INFO commands (PR #120995)

Mike Hommey via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 22:56:53 PST 2025


glandium wrote:

FWIW:
```
% strip -S js
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: warning: changes being made to the file will invalidate the code signature in: /Users/glandium/js
% ./js
zsh: killed     ./js
% codesign -s - -f js
js: replacing existing signature
% ./js               
js> 
```
Starting over:
```
% llvm-strip -S js 
% ./js
zsh: killed     ./js
% codesign -s - -f js
js: replacing existing signature
% ./js
zsh: killed     ./js
```

cctools-port does this:
```
aarch64-apple-darwin-strip: changes being made to the file will invalidate the code signature in: /tmp/js
[cctools-port]: generating fake signature for '/tmp/js.strip'
```
and the resulting binary works out of the box.

https://github.com/llvm/llvm-project/pull/120995


More information about the llvm-commits mailing list