MH_EXECUTE leave space for thread state command
modified: p_mach.cpp
This commit is contained in:
+3
-1
@@ -726,7 +726,6 @@ next:
|
|||||||
unsigned const sz_threado = threado_size();
|
unsigned const sz_threado = threado_size();
|
||||||
mhp->ncmds += 1;
|
mhp->ncmds += 1;
|
||||||
mhp->sizeofcmds += sz_threado;
|
mhp->sizeofcmds += sz_threado;
|
||||||
sz_mach_headers += sz_threado;
|
|
||||||
fo->seek(0, SEEK_SET);
|
fo->seek(0, SEEK_SET);
|
||||||
fo->rewrite(mhp, tail - (char *)mhp);
|
fo->rewrite(mhp, tail - (char *)mhp);
|
||||||
threado_rewrite(fo);
|
threado_rewrite(fo);
|
||||||
@@ -1359,6 +1358,9 @@ void PackMachBase<T>::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unsigned const sz_threado = threado_size();
|
||||||
|
MemBuffer space(sz_threado); memset(space, 0, sz_threado);
|
||||||
|
fo->write(space, sz_threado);
|
||||||
sz_mach_headers = fo->getBytesWritten();
|
sz_mach_headers = fo->getBytesWritten();
|
||||||
}
|
}
|
||||||
else if (my_filetype == Mach_header::MH_DYLIB) {
|
else if (my_filetype == Mach_header::MH_DYLIB) {
|
||||||
|
|||||||
Reference in New Issue
Block a user