source: trunk/src/win32k/ldr/myldrEnum32bitRelRecs.cpp@ 2537

Last change on this file since 2537 was 2537, checked in by bird, 26 years ago

Relocations are now applied when the page is being loaded.

File size: 2.3 KB
Line 
1/* $Id: myldrEnum32bitRelRecs.cpp,v 1.2 2000-01-27 23:43:07 bird Exp $
2 *
3 * myldrEnum32bitRelRecs - ldrEnum32bitRelRecs
4 *
5 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11/*******************************************************************************
12* Defined Constants And Macros *
13*******************************************************************************/
14#define INCL_DOSERRORS
15#define INCL_NOPMAPI
16
17
18/*******************************************************************************
19* Header Files *
20*******************************************************************************/
21#include <os2.h>
22
23#include <memory.h>
24#include <stdlib.h>
25
26#include "log.h"
27#include <peexe.h>
28#include <exe386.h>
29#include "OS2Krnl.h"
30#include "avl.h"
31#include "ModuleBase.h"
32#include "ldr.h"
33#include "ldrCalls.h"
34
35
36/**
37 * Applies relocation fixups to a page which is being loaded.
38 * @returns NO_ERROR on success?
39 * error code on error?
40 * @param pMTE Pointer Module Table Entry.
41 * @param iObject Index into the object table. (0-based)
42 * @param iPageTable Index into the page table. (0-based)
43 * @param pvPage Pointer to the page which is being loaded.
44 * @param ulPageAddress Address of page.
45 * @param pvPTDA Pointer to Per Task Data Aera
46 *
47 * @sketch Check if one of our handles.
48 */
49ULONG LDRCALL myldrEnum32bitRelRecs(
50 PMTE pMTE,
51 ULONG iObject,
52 ULONG iPageTable,
53 PVOID pvPage,
54 ULONG ulPageAddress,
55 PVOID pvPTDA
56 )
57{
58 PMODULE pMod;
59
60 pMod = getModuleByMTE(pMTE);
61 if (pMod != NULL)
62 {
63 APIRET rc;
64 #if 1
65 kprintf(("ldrEnum32BitRelRecs: pMTE=0x%08x iObject=0x%02x iPageTable=0x%03x pvPage=0x%08x\n"
66 " ulPageAddress=0x%08x pvPTDA=0x%08x\n",
67 pMTE, iObject, iPageTable, pvPage, ulPageAddress, pvPTDA
68 ));
69 #endif
70 rc = pMod->Data.pModule->applyFixups(pMTE, iObject, iPageTable, pvPage, ulPageAddress, pvPTDA);
71 if (rc != NO_ERROR)
72 return rc;
73 }
74
75 return ldrEnum32bitRelRecs(pMTE, iObject, iPageTable, pvPage, ulPageAddress, pvPTDA);
76}
Note: See TracBrowser for help on using the repository browser.