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
72423f5f
Commit
72423f5f
authored
Dec 22, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Dec 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Make the loader process relocations correctly for x86_64.
parent
83ee191f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
loader.c
dlls/ntdll/loader.c
+7
-1
virtual.c
dlls/ntdll/virtual.c
+1
-1
winternl.h
include/winternl.h
+1
-1
No files found.
dlls/ntdll/loader.c
View file @
72423f5f
...
...
@@ -2101,7 +2101,7 @@ NTSTATUS WINAPI LdrAddRefDll( ULONG flags, HMODULE module )
* Apply relocations to a given page of a mapped PE image.
*/
IMAGE_BASE_RELOCATION
*
WINAPI
LdrProcessRelocationBlock
(
void
*
page
,
UINT
count
,
USHORT
*
relocs
,
INT
delta
)
USHORT
*
relocs
,
INT
_PTR
delta
)
{
while
(
count
--
)
{
...
...
@@ -2111,6 +2111,7 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count
{
case
IMAGE_REL_BASED_ABSOLUTE
:
break
;
#ifdef __i386__
case
IMAGE_REL_BASED_HIGH
:
*
(
short
*
)((
char
*
)
page
+
offset
)
+=
HIWORD
(
delta
);
break
;
...
...
@@ -2120,6 +2121,11 @@ IMAGE_BASE_RELOCATION * WINAPI LdrProcessRelocationBlock( void *page, UINT count
case
IMAGE_REL_BASED_HIGHLOW
:
*
(
int
*
)((
char
*
)
page
+
offset
)
+=
delta
;
break
;
#elif defined(__x86_64__)
case
IMAGE_REL_BASED_DIR64
:
*
(
INT_PTR
*
)((
char
*
)
page
+
offset
)
+=
delta
;
break
;
#endif
default:
FIXME
(
"Unknown/unsupported fixup type %x.
\n
"
,
type
);
return
NULL
;
...
...
dlls/ntdll/virtual.c
View file @
72423f5f
...
...
@@ -993,7 +993,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
struct
stat
st
;
struct
file_view
*
view
=
NULL
;
char
*
ptr
,
*
header_end
;
int
delta
=
0
;
INT_PTR
delta
=
0
;
/* zero-map the whole range */
...
...
include/winternl.h
View file @
72423f5f
...
...
@@ -1978,7 +1978,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
);
IMAGE_BASE_RELOCATION
*
WINAPI
LdrProcessRelocationBlock
(
void
*
,
UINT
,
USHORT
*
,
INT
_PTR
);
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