Don't apply relocations a second time to self loaded segments.
Fixed messed up indentation in NE_FixupSegmentPrologs.
This commit is contained in:
parent
79b387deb6
commit
60a52559ac
|
@ -385,16 +385,19 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum )
|
|||
0xff00 - sizeof(STACK16FRAME));
|
||||
|
||||
hFile16 = NE_OpenFile( pModule );
|
||||
TRACE_(dll)("CallLoadAppSegProc(hmodule=0x%04x,hf=%x,segnum=%d\n",
|
||||
TRACE_(dll)("Call LoadAppSegProc(hmodule=0x%04x,hf=%x,segnum=%d)\n",
|
||||
pModule->self,hFile16,segnum );
|
||||
args[2] = pModule->self;
|
||||
args[1] = hFile16;
|
||||
args[0] = segnum;
|
||||
WOWCallback16Ex( (DWORD)selfloadheader->LoadAppSeg, WCB16_PASCAL, sizeof(args), args, &ret );
|
||||
pSeg->hSeg = LOWORD(ret);
|
||||
TRACE_(dll)("Ret CallLoadAppSegProc: hSeg = 0x%04x\n", pSeg->hSeg);
|
||||
TRACE_(dll)("Ret LoadAppSegProc: hSeg=0x%04x\n", pSeg->hSeg);
|
||||
_lclose16( hFile16 );
|
||||
NtCurrentTeb()->WOW32Reserved = oldstack;
|
||||
|
||||
pSeg->flags |= NE_SEGFLAGS_LOADED;
|
||||
return TRUE;
|
||||
}
|
||||
else if (!(pSeg->flags & NE_SEGFLAGS_ITERATED))
|
||||
{
|
||||
|
@ -566,8 +569,7 @@ static void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
|
|||
*pFunc = 0xb8; /* mov ax, */
|
||||
*(WORD *)(pFunc+1) = dgroup;
|
||||
}
|
||||
else
|
||||
if ((pModule->ne_flags & NE_FFLAGS_MULTIPLEDATA)
|
||||
else if ((pModule->ne_flags & NE_FFLAGS_MULTIPLEDATA)
|
||||
&& (entry->flags & 1)) /* exported ? */
|
||||
{
|
||||
TRACE("patch %04x:%04x -> nop, nop\n", sel, entry->offs);
|
||||
|
@ -578,8 +580,7 @@ static void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum)
|
|||
}
|
||||
entry++;
|
||||
}
|
||||
} while ( (bundle->next)
|
||||
&& (bundle = ((ET_BUNDLE *)((BYTE *)pModule + bundle->next))) );
|
||||
} while ( (bundle->next) && (bundle = ((ET_BUNDLE *)((BYTE *)pModule + bundle->next))) );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue