LC_BUILD_VERSION etc for XCode 13+

https://github.com/upx/upx/issues/578
	modified:   p_mach.cpp
	modified:   p_mach_enum.h
This commit is contained in:
John Reiser 2022-05-30 01:05:09 -07:00 committed by Markus F.X.J. Oberhumer
parent 2721ef0636
commit 4ae75375e0
2 changed files with 6 additions and 1 deletions

View File

@ -169,7 +169,7 @@ static const signed char lc_cmd_size[] = {
P(0x2f /*LC_VERSION_MIN_TVOS*/, 16), // sizeof(Mach32_version_min_command)
P(0x30 /*LC_VERSION_MIN_WATCHOS*/, 16), // sizeof(Mach32_version_min_command)
P(0x31 /*LC_NOTE*/, -40), // sizeof(note_command) + data
P(0x32 /*LC_BUILD_VERSION*/, 16), // sizeof(Mach32_source_version_command)
P(0x32 /*LC_BUILD_VERSION*/, -24), // sizeof(Mach32_build_version_command) + N*2*4
P(0x33 /*lo(LC_DYLD_EXPORTS_TRIE)*/, 16), // sizeof(linkedit_data_command)
P(0x34 /*lo(LC_DYLD_CHAINED_FIXUPS)*/, 16), // sizeof(linkedit_data_command)
P(0x35 /*lo(LC_FILESET_ENTRY)*/, -32), // sizeof(fileset_entry_command) + ???

View File

@ -108,6 +108,11 @@
LC_VERSION_MIN_TVOS= 0x2F,
LC_VERSION_MIN_WATCHOS= 0x30,
LC_NOTE = 0x31,
LC_BUILD_VERSION = 0x32, // minimum; size 6*4 + N*2*4
LC_DYLD_EXPORTS_TRIE = (0x33|LC_REQ_DYLD), // size 4*4
LC_DYLD_CHAINED_FIXUPS = (0x34|LC_REQ_DYLD), // size 4*4
LC_FILESET_ENTRY = (0x35|LC_REQ_DYLD), // size 6*4
};
enum { // maxprot