mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
macho: set CS_LINKER_SIGNED flag in code signature generated by zld
This way, if the user wants to use `codesign` (or other tool) they will not be forced to `-f` force signature update. This matches the behavior promoted by Apple's `ld64` linker.
This commit is contained in:
parent
fd29ddc06c
commit
8b5d5f44e2
@ -1718,6 +1718,7 @@ pub const CS_SIGNER_TYPE_LEGACYVPN: u32 = 5;
|
||||
pub const CS_SIGNER_TYPE_MAC_APP_STORE: u32 = 6;
|
||||
|
||||
pub const CS_ADHOC: u32 = 0x2;
|
||||
pub const CS_LINKER_SIGNED: u32 = 0x20000;
|
||||
|
||||
pub const CS_EXECSEG_MAIN_BINARY: u32 = 0x1;
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ const CodeDirectory = struct {
|
||||
.magic = macho.CSMAGIC_CODEDIRECTORY,
|
||||
.length = @sizeOf(macho.CodeDirectory),
|
||||
.version = macho.CS_SUPPORTSEXECSEG,
|
||||
.flags = macho.CS_ADHOC,
|
||||
.flags = macho.CS_ADHOC | macho.CS_LINKER_SIGNED,
|
||||
.hashOffset = 0,
|
||||
.identOffset = @sizeOf(macho.CodeDirectory),
|
||||
.nSpecialSlots = 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user