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
526b9fc8
Commit
526b9fc8
authored
Oct 04, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Support relocating the main exe.
parent
56d9e1a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
loader.c
dlls/ntdll/loader.c
+2
-1
env.c
dlls/ntdll/unix/env.c
+1
-1
loader.c
dlls/ntdll/unix/loader.c
+1
-1
No files found.
dlls/ntdll/loader.c
View file @
526b9fc8
...
...
@@ -2041,7 +2041,8 @@ static NTSTATUS perform_relocations( void *module, IMAGE_NT_HEADERS *nt, SIZE_T
if
(
nt
->
OptionalHeader
.
SectionAlignment
<
page_size
)
return
STATUS_SUCCESS
;
if
(
!
(
nt
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DLL
)
&&
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
)
if
(
!
(
nt
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DLL
)
&&
module
!=
NtCurrentTeb
()
->
Peb
->
ImageBaseAddress
)
return
STATUS_SUCCESS
;
relocs
=
&
nt
->
OptionalHeader
.
DataDirectory
[
IMAGE_DIRECTORY_ENTRY_BASERELOC
];
...
...
dlls/ntdll/unix/env.c
View file @
526b9fc8
...
...
@@ -2116,7 +2116,7 @@ void init_startup_info(void)
status
=
load_main_exe
(
params
->
ImagePathName
.
Buffer
,
NULL
,
params
->
CommandLine
.
Buffer
,
machine
,
&
image
,
&
module
);
if
(
status
)
if
(
!
NT_SUCCESS
(
status
)
)
{
MESSAGE
(
"wine: failed to start %s
\n
"
,
debugstr_us
(
&
params
->
ImagePathName
)
);
NtTerminateProcess
(
GetCurrentProcess
(),
status
);
...
...
dlls/ntdll/unix/loader.c
View file @
526b9fc8
...
...
@@ -1743,7 +1743,7 @@ NTSTATUS load_start_exe( WCHAR **image, void **module )
wcscat
(
*
image
,
startW
);
init_unicode_string
(
&
nt_name
,
*
image
);
status
=
find_builtin_dll
(
&
nt_name
,
module
,
&
size
,
&
main_image_info
,
0
,
0
,
current_machine
,
0
,
FALSE
);
if
(
status
)
if
(
!
NT_SUCCESS
(
status
)
)
{
MESSAGE
(
"wine: failed to load start.exe: %x
\n
"
,
status
);
NtTerminateProcess
(
GetCurrentProcess
(),
status
);
...
...
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