Changeset 5050 for trunk/src


Ignore:
Timestamp:
Feb 2, 2001, 9:35:54 AM (25 years ago)
Author:
bird
Message:
All-in-one-object fix is now implmented thru an option. (-1<+|[*]>)
Location:
trunk/src/win32k/pe2lx
Files:
2 edited

Legend:

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

    r4830 r5050  
    1 /* $Id: pe2lx.cpp,v 1.23 2000-12-18 14:19:24 bird Exp $
     1/* $Id: pe2lx.cpp,v 1.24 2001-02-02 08:35:54 bird Exp $
    22 *
    33 * Pe2Lx class implementation. Ring 0 and Ring 3
     
    558558     *    alignment which is not a multiple of 64Kb. The sections are concatenated into one big object. */
    559559    /* TODO! this test has to be enhanced a bit. WWPack32, new Borland++ depends on image layout. */
    560     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                           */
     560    fAllInOneObject =  !isPEOneObjectDisabled()
     561                       && (   isPEOneObjectForced()
     562                           || (pNtHdrs->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED) == IMAGE_FILE_RELOCS_STRIPPED
     563                           );
    565564    if (fAllInOneObject)
    566565    {
    567566        printInf(("All-In-One-Object fix is applied.\n"));
    568         if (pNtHdrs->OptionalHeader.ImageBase >= 0x04000000UL)
     567        if (pNtHdrs->OptionalHeader.ImageBase >= 0x04000000UL && !(pNtHdrs->FileHeader.Characteristics & IMAGE_FILE_DLL))
    569568            printWar(("ImageBase >= 64MB this object may not be runnable! (ImageBase=%#8x)\n",
    570569                     pNtHdrs->OptionalHeader.ImageBase));
  • trunk/src/win32k/pe2lx/pe2lxmain.cpp

    r2928 r5050  
    1 /* $Id: pe2lxmain.cpp,v 1.5 2000-02-27 02:18:42 bird Exp $
     1/* $Id: pe2lxmain.cpp,v 1.6 2001-02-02 08:35:54 bird Exp $
    22 *
    33 * Pe2Lx main program. (Ring 3 only!)
     
    1717#define INCL_DOSERRORS
    1818
     19#define DATA16_GLOBAL
     20#define OUTPUT_COM2     0x2f8
    1921
    2022/*******************************************************************************
     
    3234#include "modulebase.h"
    3335#include "pe2lx.h"
     36#include "options.h"
    3437#include <stdio.h>
    3538#include <versionos2.h>
     
    4043*******************************************************************************/
    4144char szBackupWin32Filename[CCHMAXPATH]; /* too save stack/heap */
    42 
     45struct options options = DEFAULT_OPTION_ASSIGMENTS;
    4346
    4447/*******************************************************************************
     
    8285            switch (argv[argi][1])
    8386            {
     87                case '1':   /* All-In-One-Object fix - temporary...- -1<-|+|*> */
     88                    if (argv[argi][2] == '-')
     89                        options.fPEOneObject = FLAGS_PEOO_DISABLED;
     90                    else if (argv[argi][2] == '+')
     91                        options.fPEOneObject = FLAGS_PEOO_ENABLED;
     92                    else
     93                        options.fPEOneObject = FLAGS_PEOO_FORCED;
     94                    break;
     95
     96
    8497                case 'h': /* syntax help */
    8598                case 'H':
     
    232245static void syntax()
    233246{
    234     printf("Syntax: pe2lx.exe -W<0|1|2|3> <Win32File> [Odin32File]\n"
     247    printf("Syntax: pe2lx.exe [-W<0|1|2|3>] [-1<+|-|[*]>] <Win32File> [Odin32File]\n"
    235248           "\n"
    236249           "  -W<0|1|2|3|4> Message filter level.\n"
     
    242255           "                   -W4: Output absolutely all messages.\n"
    243256           "                Default: -W3\n"
     257           "  -1<+|-|[*]>   All-in-one-object fix.\n"
     258           "                     +: Fix applied when necessary.\n"
     259           "                     -: Disabled. Never applied.\n"
     260           "                     *: Forced. Applied every time.\n"
     261           "                Default: -1*\n"
    244262           "  Win32File     Input Win32 Exe, Dll or other Win32 PE file.\n"
    245263           "  Odin32File    Output Odin32-file. If not specified the Win32-file is\n"
Note: See TracChangeset for help on using the changeset viewer.