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
6d22775b
Commit
6d22775b
authored
Jun 17, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Jun 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add zero_bits parameter to open_builtin_pe_file.
Signed-off-by:
Brendan Shanks
<
bshanks@codeweavers.com
>
parent
9bed3adc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
loader.c
dlls/ntdll/unix/loader.c
+7
-7
No files found.
dlls/ntdll/unix/loader.c
View file @
6d22775b
...
...
@@ -1477,7 +1477,7 @@ static NTSTATUS open_dll_file( const char *name, OBJECT_ATTRIBUTES *attr, HANDLE
*/
static
NTSTATUS
open_builtin_pe_file
(
const
char
*
name
,
OBJECT_ATTRIBUTES
*
attr
,
void
**
module
,
SIZE_T
*
size
,
SECTION_IMAGE_INFORMATION
*
image_info
,
WORD
machine
,
BOOL
prefer_native
)
ULONG_PTR
zero_bits
,
WORD
machine
,
BOOL
prefer_native
)
{
NTSTATUS
status
;
HANDLE
mapping
;
...
...
@@ -1486,7 +1486,7 @@ static NTSTATUS open_builtin_pe_file( const char *name, OBJECT_ATTRIBUTES *attr,
status
=
open_dll_file
(
name
,
attr
,
&
mapping
);
if
(
!
status
)
{
status
=
virtual_map_builtin_module
(
mapping
,
module
,
size
,
image_info
,
0
,
machine
,
prefer_native
);
status
=
virtual_map_builtin_module
(
mapping
,
module
,
size
,
image_info
,
zero_bits
,
machine
,
prefer_native
);
NtClose
(
mapping
);
}
return
status
;
...
...
@@ -1572,7 +1572,7 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
ptr
=
prepend
(
ptr
,
ptr
,
namelen
);
ptr
=
prepend
(
ptr
,
"/dlls"
,
sizeof
(
"/dlls"
)
-
1
);
ptr
=
prepend
(
ptr
,
build_dir
,
strlen
(
build_dir
)
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
machine
,
prefer_native
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
0
,
machine
,
prefer_native
);
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
strcpy
(
file
+
pos
+
len
+
1
,
".so"
);
status
=
open_builtin_so_file
(
ptr
,
&
attr
,
module
,
image_info
,
machine
,
prefer_native
);
...
...
@@ -1586,7 +1586,7 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
ptr
=
prepend
(
ptr
,
ptr
,
namelen
);
ptr
=
prepend
(
ptr
,
"/programs"
,
sizeof
(
"/programs"
)
-
1
);
ptr
=
prepend
(
ptr
,
build_dir
,
strlen
(
build_dir
)
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
machine
,
prefer_native
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
0
,
machine
,
prefer_native
);
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
strcpy
(
file
+
pos
+
len
+
1
,
".so"
);
status
=
open_builtin_so_file
(
ptr
,
&
attr
,
module
,
image_info
,
machine
,
prefer_native
);
...
...
@@ -1599,7 +1599,7 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
file
[
pos
+
len
+
1
]
=
0
;
ptr
=
prepend
(
ptr
,
pe_dir
,
strlen
(
pe_dir
)
);
ptr
=
prepend
(
ptr
,
dll_paths
[
i
],
strlen
(
dll_paths
[
i
])
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
machine
,
prefer_native
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
0
,
machine
,
prefer_native
);
/* use so dir for unix lib */
ptr
=
file
+
pos
;
ptr
=
prepend
(
ptr
,
so_dir
,
strlen
(
so_dir
)
);
...
...
@@ -1610,7 +1610,7 @@ static NTSTATUS find_builtin_dll( UNICODE_STRING *nt_name, void **module, SIZE_T
if
(
status
!=
STATUS_DLL_NOT_FOUND
)
goto
done
;
file
[
pos
+
len
+
1
]
=
0
;
ptr
=
prepend
(
file
+
pos
,
dll_paths
[
i
],
strlen
(
dll_paths
[
i
])
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
machine
,
prefer_native
);
status
=
open_builtin_pe_file
(
ptr
,
&
attr
,
module
,
size_ptr
,
image_info
,
0
,
machine
,
prefer_native
);
if
(
status
==
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
)
{
found_image
=
TRUE
;
...
...
@@ -1981,7 +1981,7 @@ static void load_ntdll(void)
name
=
malloc
(
strlen
(
ntdll_dir
)
+
strlen
(
pe_dir
)
+
sizeof
(
"/ntdll.dll.so"
)
);
if
(
build_dir
)
sprintf
(
name
,
"%s/ntdll.dll"
,
ntdll_dir
);
else
sprintf
(
name
,
"%s%s/ntdll.dll"
,
dll_dir
,
pe_dir
);
status
=
open_builtin_pe_file
(
name
,
&
attr
,
&
module
,
&
size
,
&
info
,
current_machine
,
FALSE
);
status
=
open_builtin_pe_file
(
name
,
&
attr
,
&
module
,
&
size
,
&
info
,
0
,
current_machine
,
FALSE
);
if
(
status
==
STATUS_DLL_NOT_FOUND
)
{
sprintf
(
name
,
"%s/ntdll.dll.so"
,
ntdll_dir
);
...
...
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