Ignore:
Timestamp:
Mar 11, 2001, 5:49:16 PM (24 years ago)
Author:
bird
Message:

Made it compile by fixing header trouble and stubbing virtual functions.

File:
1 edited

Legend:

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

    r5086 r5299  
    1 /* $Id: elf2lx.cpp,v 1.6 2001-02-10 11:11:42 bird Exp $
     1/* $Id: elf2lx.cpp,v 1.7 2001-03-11 16:49:16 bird Exp $
    22 *
    33 * Elf2Lx - implementation.
     
    1515#define FOR_EXEHDR 1                    /* To make all object flags OBJ???. */
    1616#define INCL_DOSERRORS                  /* DOS Error codes. */
     17#define INCL_OS2KRNL_LDR                /* LdrRead */
    1718#ifdef RING0
    18     #define INCL_OS2KRNL_LDR            /* LdrRead */
    1919    #define INCL_NOAPI                  /* RING0: No apis. */
    2020#else /*RING3*/
    2121    #define INCL_DOSPROCESS             /* RING3: DosSleep. */
     22    #define INCL_OS2KRNL_LDR_NOAPIS     /* No apis */
    2223#endif
    2324
     
    2930#include <newexe.h>                     /* OS/2 NE structs and definitions. */
    3031#include <exe386.h>                     /* OS/2 LX structs and definitions. */
     32#include "elf.h"                        /* Elf binary format definitions. */
    3133
    3234#include "devSegDf.h"                   /* Win32k segment definitions. */
     
    4547#include "OS2Krnl.h"                    /* kernel structs.  (SFN) */
    4648
    47 #include "elf.h"                        /* Elf binary format definitions. */
    4849#include "modulebase.h"                 /* ModuleBase class definitions, ++. */
    4950#include "elf2lx.h"                     /* Elf2Lx class definitions.  */
     
    271272}
    272273
     274
     275/**
     276 * Read data from the virtual LX-file.
     277 * @param     offLXFile  Offset (into the virtual lx file) of the data to read
     278 * @param     pvBuffer   Pointer to buffer where data is to be put.
     279 * @param     cbToRead   Bytes to be read.
     280 * @param     fpBuffer   Flags which was spesified to the ldrRead call.
     281 * @parma     pMTE       Pointer to MTE which was specified to the ldrRead call.
     282 * @return    NO_ERROR if successful something else if not.
     283 * @status    completely implmented; tested.
     284 * @author    knut st. osmundsen
     285 */
     286ULONG Elf2Lx::read(ULONG offLXFile, PVOID pvBuffer, ULONG fpBuffer, ULONG cbToRead, PMTE pMTE)
     287{
     288    NOREF(offLXFile);
     289    NOREF(pvBuffer);
     290    NOREF(fpBuffer);
     291    NOREF(cbToRead);
     292    NOREF(pMTE);
     293    return ERROR_READ_FAULT;
     294}
     295
     296
     297/**
     298 * Applies relocation fixups to a page which is being loaded.
     299 * @returns    NO_ERROR on success?
     300 *             error code on error?
     301 * @param      pMTE           Pointer Module Table Entry.
     302 * @param      iObject        Index into the object table. (0-based)
     303 * @param      iPageTable     Index into the page table. (0-based)
     304 * @param      pvPage         Pointer to the page which is being loaded.
     305 * @param      ulPageAddress  Address of page.
     306 * @param      pvPTDA         Pointer to Per Task Data Aera
     307 *
     308 * @sketch     Find RVA.
     309 * @remarks    Some more information on relocations:
     310 */
     311ULONG  Elf2Lx::applyFixups(PMTE pMTE, ULONG iObject, ULONG iPageTable, PVOID pvPage,
     312                           ULONG ulPageAddress, PVOID pvPTDA)
     313{
     314    NOREF(pMTE);
     315    NOREF(iObject);
     316    NOREF(iPageTable);
     317    NOREF(pvPage);
     318    NOREF(ulPageAddress);
     319    NOREF(pvPTDA);
     320    return ERROR_READ_FAULT;
     321}
     322
     323
     324/**
     325 * Writes the virtual LX file to a file. (Ring 3 only!)
     326 * @returns   NO_ERROR on success. Error code on error.
     327 * @param     pszLXFilename  Pointer to name of the LX file.
     328 * @sketch    Find size of the virtual LX-file.
     329 *            Open the output file.
     330 *            LOOP while more to left of file
     331 *            BEGIN
     332 *                read into buffer from virtual LX-file.
     333 *                write to output file.
     334 *            END
     335 *            return success or errorcode.
     336 * @status    compeletely implemented; tested.
     337 * @author    knut st. osmundsen
     338 */
     339ULONG Elf2Lx::writeFile(PCSZ pszLXFilename)
     340{
     341    NOREF(pszLXFilename);
     342    return ERROR_WRITE_FAULT;
     343}
     344
     345
     346/**
     347 * Dumps info on the virtual Lx file.
     348 * Currently it only dumps sizes and offsets.
     349 * @status    partially implemented.
     350 * @author    knut st. osmundsen
     351 */
     352VOID Elf2Lx::dumpVirtualLxFile()
     353{
     354
     355}
     356
Note: See TracChangeset for help on using the changeset viewer.