This is an archive of the discontinued LLVM Phabricator instance.

[llvm] strip code signature load commands with llvm-bitcode-strip
AbandonedPublic

Authored by rmaz on Mar 3 2022, 10:10 AM.

Details

Summary

This diff adds stripping of LC_CODE_SIGNATURE load commands with
llvm-bitcode-strip by default. The -keep_cs flag is added to
preserve code signature load commands.

Diff Detail

Event Timeline

rmaz created this revision.Mar 3 2022, 10:10 AM
rmaz requested review of this revision.Mar 3 2022, 10:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 10:10 AM
rmaz abandoned this revision.Mar 3 2022, 12:21 PM

It looks like we don't need this change as code signature updating was implemented in D111164. Verified with:

% llvm-bitcode-strip -r -keep_cs libswiftCore.dylib -o stripped.dylib
% codesign -v -vvv stripped.dylib
stripped.dylib: valid on disk
stripped.dylib: satisfies its Designated Requirement