Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
bf89330f
Commit
bf89330f
authored
Jan 17, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Do not perform base relocation if an image is not a DLL.
parent
5a5a9bcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
virtual.c
dlls/ntdll/virtual.c
+5
-3
No files found.
dlls/ntdll/virtual.c
View file @
bf89330f
...
...
@@ -1147,14 +1147,16 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
/* perform base relocation, if necessary */
if
(
ptr
!=
base
)
if
(
ptr
!=
base
&&
((
nt
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DLL
)
||
!
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
)
)
{
const
IMAGE_DATA_DIRECTORY
*
relocs
;
relocs
=
&
nt
->
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_BASERELOC
];
if
(
nt
->
FileHeader
.
Characteristics
&
IMAGE_FILE_RELOCS_STRIPPED
)
{
WARN
(
"Need to relocate module from addr %lx, but there are no relocation records
\n
"
,
WARN
_
(
module
)
(
"Need to relocate module from addr %lx, but there are no relocation records
\n
"
,
(
ULONG_PTR
)
nt
->
OptionalHeader
.
ImageBase
);
status
=
STATUS_CONFLICTING_ADDRESSES
;
goto
error
;
...
...
@@ -1165,7 +1167,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
* Some DLLs really check the MSB of the module handle :-/
*/
if
((
nt
->
OptionalHeader
.
ImageBase
&
0x80000000
)
&&
!
((
ULONG_PTR
)
base
&
0x80000000
))
ERR
(
"Forced to relocate system DLL (base > 2GB). This is not good.
\n
"
);
ERR
_
(
module
)
(
"Forced to relocate system DLL (base > 2GB). This is not good.
\n
"
);
if
(
!
do_relocations
(
ptr
,
relocs
,
ptr
-
base
,
total_size
))
{
...
...
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