MacOS BigSur wants no MH_DYLDLINK for our MH_EXECUTE
https://github.com/upx/upx/issues/434 modified: p_mach.cpp
This commit is contained in:
parent
801618740c
commit
1ab6e01de2
@ -1194,7 +1194,11 @@ void PackMachBase<T>::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e
|
|||||||
mhdro = mhdri;
|
mhdro = mhdri;
|
||||||
if (my_filetype==Mach_header::MH_EXECUTE) {
|
if (my_filetype==Mach_header::MH_EXECUTE) {
|
||||||
memcpy(&mhdro, stub_main, sizeof(mhdro));
|
memcpy(&mhdro, stub_main, sizeof(mhdro));
|
||||||
mhdro.flags = mhdri.flags;
|
mhdro.flags = mhdri.flags & ~(
|
||||||
|
Mach_header::MH_DYLDLINK // no dyld at this time
|
||||||
|
| Mach_header::MH_TWOLEVEL // dyld-specific
|
||||||
|
| Mach_header::MH_BINDATLOAD // dyld-specific
|
||||||
|
);
|
||||||
COMPILE_TIME_ASSERT(sizeof(mhdro.flags) == sizeof(unsigned))
|
COMPILE_TIME_ASSERT(sizeof(mhdro.flags) == sizeof(unsigned))
|
||||||
}
|
}
|
||||||
unsigned pos = sizeof(mhdro);
|
unsigned pos = sizeof(mhdro);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user