mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
propagate cpusubtype
modified: p_mach.cpp modified: p_mach.h
This commit is contained in:
parent
cf56086f06
commit
3df7d26101
|
@ -626,6 +626,7 @@ void PackMachBase<T>::pack4(OutputFile *fo, Filter &ft) // append PackHeader
|
|||
memcpy(upxstub, stub_main, sz_stub_main);
|
||||
|
||||
Mach_header *const mhp = (Mach_header *)upxstub;
|
||||
mhp->cpusubtype = my_cpusubtype;
|
||||
char *tail = (char *)(1+ mhp);
|
||||
Mach_segment_command *segtxt = 0; // in temp for output
|
||||
Mach_section_command *sectxt = 0; // in temp for output
|
||||
|
@ -1633,6 +1634,7 @@ int PackMachBase<T>::canUnpack()
|
|||
|| my_filetype !=mhdri.filetype
|
||||
)
|
||||
return false;
|
||||
my_cpusubtype = mhdri.cpusubtype;
|
||||
|
||||
rawmseg = (Mach_segment_command *)new char[(unsigned) mhdri.sizeofcmds];
|
||||
fi->readx(rawmseg, mhdri.sizeofcmds);
|
||||
|
@ -1817,6 +1819,7 @@ bool PackMachBase<T>::canPack()
|
|||
|| my_filetype !=mhdri.filetype
|
||||
)
|
||||
return false;
|
||||
my_cpusubtype = mhdri.cpusubtype;
|
||||
|
||||
rawmseg = (Mach_segment_command *)new char[(unsigned) mhdri.sizeofcmds];
|
||||
fi->readx(rawmseg, mhdri.sizeofcmds);
|
||||
|
|
|
@ -831,6 +831,7 @@ protected:
|
|||
|
||||
upx_uint64_t entryVMA;
|
||||
unsigned my_cputype;
|
||||
unsigned my_cpusubtype;
|
||||
unsigned my_filetype;
|
||||
unsigned my_thread_flavor;
|
||||
unsigned my_thread_state_word_count;
|
||||
|
|
Loading…
Reference in New Issue
Block a user