dos/com and dos/sys: only add the `sbb bp,bp' section to the stub

if it is needed.

committer: mfx <mfx> 978538864 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2001-01-03 16:21:04 +00:00
parent 5ddec963d0
commit 25a6da5638
5 changed files with 10 additions and 4 deletions
+3 -1
View File
@@ -118,7 +118,7 @@ void PackCom::patchLoader(OutputFile *fo,
// NOTE: Depends on: decompr_start == cutpoint+1 !!!
patch_le16(loader,e_len,"JM",upper_end - 0xff - d_len - getLoaderSection("UPX1HEAD"));
loader[getLoaderSection("COMSUBSI") - 1] = (upx_byte) -e_len;
loader[getLoaderSectionStart("COMSUBSI") - 1] = (upx_byte) -e_len;
patch_le16(loader,e_len,"DI",upper_end);
patch_le16(loader,e_len,"SI",ph.c_len + lsize + 0x100);
patch_le16(loader,e_len,"CX",ph.c_len + lsize);
@@ -141,6 +141,8 @@ int PackCom::buildLoader(const Filter *ft)
const int filter_id = ft->id;
initLoader(nrv2b_loader,sizeof(nrv2b_loader));
addLoader("COMMAIN1""COMSUBSI",
ph.first_offset_found == 1 ? "COMSBBBP" : "",
"COMPSHDI",
filter_id ? "COMCALLT" : "",
"COMMAIN2""UPX1HEAD""COMCUTPO""NRV2B160",
filter_id ? "NRVDDONE" : "NRVDRETU",