Ignore:
Timestamp:
Sep 22, 2000, 5:47:37 AM (25 years ago)
Author:
bird
Message:

Corrected bug in applyFixups which caused fixups not to be applied when
fAllInOneObject was set.
Force all-in-one-object (alignment) fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/pe2lx/pe2lx.cpp

    r4164 r4302  
    1 /* $Id: pe2lx.cpp,v 1.19 2000-09-02 21:08:16 bird Exp $
     1/* $Id: pe2lx.cpp,v 1.20 2000-09-22 03:47:37 bird Exp $
    22 *
    33 * Pe2Lx class implementation. Ring 0 and Ring 3
     
    559559    /* TODO! this test has to be enhanced a bit. WWPack32, new Borland++ depends on image layout. */
    560560    fAllInOneObject = (pNtHdrs->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED) == IMAGE_FILE_RELOCS_STRIPPED;
     561    fAllInOneObject = 1; /* KSO Fri 22.09.2000: for the time beeing we'll allways apply the alignment fix.
     562                          * There are just too many apps failing because of missing baserelocations.
     563                          * When I have explored the VDM flag of VMAllocMem I'll remove this.
     564                          */
    561565    if (fAllInOneObject)
    562566    {
     
    10791083            fDeltaOnly = TRUE;          /* IMPORTANT: Later code assumes that this is true when fAllInOneObject is true. */
    10801084            if (fAllInOneObject)
    1081                 fApplyFixups = ulImageBase == pSMTE->smte_objtab[0].ote_base;
     1085                fApplyFixups = ulImageBase != pSMTE->smte_objtab[0].ote_base;
    10821086            else
    10831087            {
     
    12611265                            {
    12621266                                case IMAGE_REL_BASED_HIGHLOW:
     1267                                    printInfA(("IMAGE_REL_BASED_HIGHLOW offset=0x%08x\n", offFixup));
    12631268                                    if (fDeltaOnly)
    12641269                                        *pul += ulDelta;
     
    12831288                                case IMAGE_REL_BASED_HIGHADJ:   /* According to M$ docs these seems to be the same fixups. */
    12841289                                case IMAGE_REL_BASED_HIGH3ADJ:
    1285                                     printInf(("IMAGE_REL_BASED_HIGH offset=0x%08x\n", offFixup));
     1290                                    printInfA(("IMAGE_REL_BASED_HIGH offset=0x%08x\n", offFixup));
    12861291                                    *(PUSHORT)pul += (USHORT)(ulDelta >> 16);
    12871292                                    break;
    12881293                                /* Will probably not work very well until the 64KB object alignment is gone! */
    12891294                                case IMAGE_REL_BASED_LOW:
    1290                                     printInf(("IMAGE_REL_BASED_LOW  offset=0x%08x\n", offFixup));
     1295                                    printInfA(("IMAGE_REL_BASED_LOW  offset=0x%08x\n", offFixup));
    12911296                                    *(PUSHORT)pul += (USHORT)ulDelta;
    12921297                                    break;
     
    16441649        for (i=i; cbObject > 0; cbObject -= PAGESIZE, ulAddress += PAGESIZE, ulRVA += PAGESIZE)
    16451650        {
     1651            printInf(("Page at RVA 0x%08x\n", ulRVA));
    16461652            rc = readAtRVA(ulRVA, &achPage[0], PAGESIZE);
    16471653            if (rc != NO_ERROR)
Note: See TracChangeset for help on using the changeset viewer.