mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[FREELDR] Pass VA instead of PA to PeLdrAllocateDataTableEntry
This allows to create DTEs for loader modules.
This commit is contained in:
parent
8a5ef4c1cc
commit
6eac9b5891
3 changed files with 10 additions and 6 deletions
|
@ -44,7 +44,7 @@ PeLdrAllocateDataTableEntry(
|
|||
IN OUT PLIST_ENTRY ModuleListHead,
|
||||
IN PCCH BaseDllName,
|
||||
IN PCCH FullDllName,
|
||||
IN PVOID BasePA,
|
||||
IN PVOID BaseVA,
|
||||
OUT PLDR_DATA_TABLE_ENTRY *NewEntry);
|
||||
|
||||
VOID
|
||||
|
|
|
@ -418,7 +418,7 @@ PeLdrpLoadAndScanReferencedDll(
|
|||
Success = PeLdrAllocateDataTableEntry(Parent ? Parent->Blink : ModuleListHead,
|
||||
ImportName,
|
||||
FullDllName,
|
||||
BasePA,
|
||||
PaToVa(BasePA),
|
||||
DataTableEntry);
|
||||
if (!Success)
|
||||
{
|
||||
|
@ -682,10 +682,10 @@ PeLdrAllocateDataTableEntry(
|
|||
IN OUT PLIST_ENTRY ModuleListHead,
|
||||
IN PCCH BaseDllName,
|
||||
IN PCCH FullDllName,
|
||||
IN PVOID BasePA,
|
||||
IN PVOID BaseVA,
|
||||
OUT PLDR_DATA_TABLE_ENTRY *NewEntry)
|
||||
{
|
||||
PVOID BaseVA = PaToVa(BasePA);
|
||||
PVOID BasePA = VaToPa(BaseVA);
|
||||
PWSTR BaseDllNameBuffer, Buffer;
|
||||
PLDR_DATA_TABLE_ENTRY DataTableEntry;
|
||||
PIMAGE_NT_HEADERS NtHeaders;
|
||||
|
|
|
@ -342,7 +342,11 @@ WinLdrLoadDeviceDriver(PLIST_ENTRY LoadOrderListHead,
|
|||
}
|
||||
|
||||
// Allocate a DTE for it
|
||||
Success = PeLdrAllocateDataTableEntry(LoadOrderListHead, DllName, DllName, DriverBase, DriverDTE);
|
||||
Success = PeLdrAllocateDataTableEntry(LoadOrderListHead,
|
||||
DllName,
|
||||
DllName,
|
||||
PaToVa(DriverBase),
|
||||
DriverDTE);
|
||||
if (!Success)
|
||||
{
|
||||
/* Cleanup and bail out */
|
||||
|
@ -542,7 +546,7 @@ LoadModule(
|
|||
Success = PeLdrAllocateDataTableEntry(&LoaderBlock->LoadOrderListHead,
|
||||
ImportName,
|
||||
FullFileName,
|
||||
BaseAddress,
|
||||
PaToVa(BaseAddress),
|
||||
Dte);
|
||||
if (!Success)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue