Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fca60677
Commit
fca60677
authored
Apr 02, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implemented LdrProcessRelocationBlock.
parent
d2dd8f94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
loader.c
dlls/ntdll/loader.c
+35
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
winternl.h
include/winternl.h
+1
-0
No files found.
dlls/ntdll/loader.c
View file @
fca60677
...
...
@@ -2035,6 +2035,41 @@ NTSTATUS WINAPI LdrAddRefDll( ULONG flags, HMODULE module )
}
/***********************************************************************
* LdrProcessRelocationBlock (NTDLL.@)
*
* Apply relocations to a given page of a mapped PE image.
*/
IMAGE_BASE_RELOCATION
*
WINAPI
LdrProcessRelocationBlock
(
void
*
page
,
UINT
count
,
USHORT
*
relocs
,
INT
delta
)
{
while
(
count
--
)
{
USHORT
offset
=
*
relocs
&
0xfff
;
int
type
=
*
relocs
>>
12
;
switch
(
type
)
{
case
IMAGE_REL_BASED_ABSOLUTE
:
break
;
case
IMAGE_REL_BASED_HIGH
:
*
(
short
*
)((
char
*
)
page
+
offset
)
+=
HIWORD
(
delta
);
break
;
case
IMAGE_REL_BASED_LOW
:
*
(
short
*
)((
char
*
)
page
+
offset
)
+=
LOWORD
(
delta
);
break
;
case
IMAGE_REL_BASED_HIGHLOW
:
*
(
int
*
)((
char
*
)
page
+
offset
)
+=
delta
;
break
;
default:
FIXME
(
"Unknown/unsupported fixup type %x.
\n
"
,
type
);
return
NULL
;
}
relocs
++
;
}
return
(
IMAGE_BASE_RELOCATION
*
)
relocs
;
/* return address of next block */
}
/******************************************************************
* LdrQueryProcessModuleInformation
*
...
...
dlls/ntdll/ntdll.spec
View file @
fca60677
...
...
@@ -72,7 +72,7 @@
@ stub LdrLoadAlternateResourceModule
@ stdcall LdrLoadDll(wstr long ptr ptr)
@ stdcall LdrLockLoaderLock(long ptr ptr)
@ st
ub LdrProcessRelocationBlock
@ st
dcall LdrProcessRelocationBlock(ptr long ptr long)
@ stub LdrQueryImageFileExecutionOptions
@ stdcall LdrQueryProcessModuleInformation(ptr long ptr)
@ stub LdrSetAppCompatDllRedirectionCallback
...
...
include/winternl.h
View file @
fca60677
...
...
@@ -1844,6 +1844,7 @@ NTSYSAPI NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, UL
NTSYSAPI
void
WINAPI
LdrInitializeThunk
(
ULONG
,
ULONG
,
ULONG
,
ULONG
);
NTSYSAPI
NTSTATUS
WINAPI
LdrLoadDll
(
LPCWSTR
,
DWORD
,
const
UNICODE_STRING
*
,
HMODULE
*
);
NTSYSAPI
NTSTATUS
WINAPI
LdrLockLoaderLock
(
ULONG
,
ULONG
*
,
ULONG
*
);
IMAGE_BASE_RELOCATION
*
WINAPI
LdrProcessRelocationBlock
(
void
*
,
UINT
,
USHORT
*
,
INT
);
NTSYSAPI
NTSTATUS
WINAPI
LdrQueryProcessModuleInformation
(
SYSTEM_MODULE_INFORMATION
*
,
ULONG
,
ULONG
*
);
NTSYSAPI
void
WINAPI
LdrShutdownProcess
(
void
);
NTSYSAPI
void
WINAPI
LdrShutdownThread
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment