Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ca6dbf7c
Commit
ca6dbf7c
authored
Aug 06, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't change base in map_image since we use it later on.
Added some tracing.
parent
c1dec293
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
virtual.c
memory/virtual.c
+9
-6
No files found.
memory/virtual.c
View file @
ca6dbf7c
...
...
@@ -502,6 +502,9 @@ static int do_relocations( char *base, const IMAGE_DATA_DIRECTORY *dir,
{
IMAGE_BASE_RELOCATION
*
rel
;
TRACE_
(
module
)(
"relocating from %p-%p to %p-%p
\n
"
,
base
-
delta
,
base
-
delta
+
total_size
,
base
,
base
+
total_size
);
for
(
rel
=
(
IMAGE_BASE_RELOCATION
*
)(
base
+
dir
->
VirtualAddress
);
((
char
*
)
rel
<
base
+
dir
->
VirtualAddress
+
dir
->
Size
)
&&
rel
->
SizeOfBlock
;
rel
=
(
IMAGE_BASE_RELOCATION
*
)((
char
*
)
rel
+
rel
->
SizeOfBlock
)
)
...
...
@@ -576,9 +579,9 @@ static LPVOID map_image( HANDLE hmapping, int fd, char *base, DWORD total_size,
/* zero-map the whole range */
if
(
base
<
(
char
*
)
0x110000
)
base
=
0
;
/* make sure the DOS area remains free */
if
(
(
ptr
=
wine_anon_mmap
(
base
,
total_size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
0
))
==
(
char
*
)
-
1
)
if
(
base
<
(
char
*
)
0x110000
||
/* make sure the DOS area remains free */
(
ptr
=
wine_anon_mmap
(
base
,
total_size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
0
))
==
(
char
*
)
-
1
)
{
ptr
=
wine_anon_mmap
(
NULL
,
total_size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
0
);
...
...
@@ -680,14 +683,14 @@ static LPVOID map_image( HANDLE hmapping, int fd, char *base, DWORD total_size,
continue
;
}
if
(
sec
->
Characteristics
&
IMAGE_SCN_CNT_UNINITIALIZED_DATA
)
continue
;
if
(
!
sec
->
PointerToRawData
||
!
sec
->
SizeOfRawData
)
continue
;
TRACE_
(
module
)(
"mapping section %.8s at %p off %lx size %lx flags %lx
\n
"
,
sec
->
Name
,
ptr
+
sec
->
VirtualAddress
,
sec
->
PointerToRawData
,
sec
->
SizeOfRawData
,
sec
->
Characteristics
);
if
(
sec
->
Characteristics
&
IMAGE_SCN_CNT_UNINITIALIZED_DATA
)
continue
;
if
(
!
sec
->
PointerToRawData
||
!
sec
->
SizeOfRawData
)
continue
;
/* Note: if the section is not aligned properly VIRTUAL_mmap will magically
* fall back to read(), so we don't need to check anything here.
*/
...
...
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