Commit Graph

5666 Commits

Author SHA1 Message Date
Alexandre Julliard 7512c53b89 ntdll: Cache the main image section information.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50937
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 10:51:32 +02:00
Alexandre Julliard 89db25afda ntdll: Check for DLL files when creating new processes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50912
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Alexandre Julliard 6d5a6c3466 ntdll: Avoid closing a handle twice.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Alexandre Julliard 7c0d6e8067 ntdll: Also fallback to native if builtin is for the wrong architecture.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:09 +02:00
Alexandre Julliard 2330a5860a ntdll: Stop exporting wine_server_send_fd() and wine_server_release_fd().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:01 +02:00
Alexandre Julliard 985bd97c2b ntdll: Retrieve Wine version strings through NtQuerySystemInformation().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:01 +02:00
Alexandre Julliard beff5c56cd ntdll: Move the PEB initialization to LdrInitializeThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 12:08:09 +02:00
Alexandre Julliard 04762b3576 ntdll: Move the global options initialization to LdrInitializeThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 12:08:09 +02:00
Alexandre Julliard 4f594e1552 ntdll: Move Wow64 initialization to LdrInitializeThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 12:08:09 +02:00
Alexandre Julliard 7a1ed2e121 ntdll: Remove path from application name to open loadorder key.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50914
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-03 13:00:46 +02:00
Alexandre Julliard 7929b21ede ntdll: Define NtCurrentTeb64() on 64-bit to avoid some #ifdefs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 12:25:21 +02:00
Alexandre Julliard e6ed943028 ntdll: Move creation of the initial modules to LdrInitializeThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 12:01:43 +02:00
Alexandre Julliard c00c62bbfd ntdll: Create the initial stack on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 11:25:48 +02:00
Paul Gofman 51f7c9d15e ntdll: Close server socket before calling exit().
So if a native exit handler hangs the process eventually gets killed by server.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Alexandre Julliard 2a8a4cbbe6 ntdll: Move kernel32 loading into LdrInitializeThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 21:13:45 +02:00
Alexandre Julliard 0bbbf016b1 ntdll: Return system dir path for PE mapping bootstrap placeholders.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 21:13:45 +02:00
Alexandre Julliard 42de71c387 ntdll: Fail to load non-existent dlls, except during prefix bootstrap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 21:01:31 +02:00
Alexandre Julliard 8bcb44a99b ntdll: Also check syswow64 to determine if the prefix was initialized.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 19:26:09 +02:00
Alexandre Julliard afaf35b9e1 include: Add more SYSTEM_INFORMATION_CLASS definitions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Paul Gofman 084519a82b ntdll: Implement NtQuerySystemInformationEx(SystemCpuSetInformation).
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Alexandre Julliard c5b0dd5fc2 ntdll: Set the window title to the image name on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Alexandre Julliard f55f0b8448 ntdll: Remove load_builtin_dll() and get_load_order() from the Unix interface.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:28 +02:00
Alexandre Julliard bb065801a6 ntdll: Map the builtin or fake dll from the Wine dirs if it's missing from the prefix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:25 +02:00
Alexandre Julliard 4a10f3a188 ntdll: Allow using the .fake files from the build tree as PE mapping placeholders.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 10:06:44 +02:00
Alexandre Julliard a3d9c487de ntdll: Load builtin exe without a corresponding file only before the prefix is fully initialized.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:59:38 +02:00
Alexandre Julliard 726cf9c0eb ntdll: Make sure the argv array matches the Unicode version, even when launching start.exe.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:56:32 +02:00
Zebediah Figura 195c57eeb7 ntdll: Report SegDs to be identical to SegSs in x86_64 exception handlers.
Based on a patch by Dávid Török.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47970
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 22:44:35 +02:00
Zebediah Figura 10d7a804c1 ntdll/tests: Add a test for segment register contents in x86_64 exception handlers.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 22:44:35 +02:00
Alexandre Julliard b12bf4d8d8 ntdll: Unmap main image even if not loaded at base address.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50874
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 12:19:59 +02:00
Alexandre Julliard f17483b936 ntdll: Check the loadorder for .so dlls on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard e8ec7a8cec ntdll: Don't pass the application name to get_load_order().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard 4e2bd548b1 ntdll: Make the is_win64 variable global.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 14:48:34 +01:00
Alexandre Julliard 482a26e135 ntdll: Use the same builtin check for process creation and initial image loading.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 11:38:43 +01:00
Mark Harmstone 9ea1134eea ntdll: Add error mapping for MUI statuses.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 21:52:18 +01:00
Alexandre Julliard 9bdfb1f34a ntdll: Set the initial DllPath to null if it's empty.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 12:07:04 +01:00
Alexandre Julliard 50e33a213d ntdll: Use start /exec to support absolute Unix paths.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard aef821ccbd ntdll: Add a helper to launch start.exe always as builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard 967100258f ntdll: Check the main image for Unix path only the first time around.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard 47fed8f5bc ntdll: Don't set the DllPath parameter by default.
Recent Windows versions don't set it either.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard 34884bf5d0 ntdll: Remove the no longer needed exec_process() function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard 28fe84da45 ntdll: Load the main image from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard 662730a1bf ntdll: Set the Wow64 environment variables from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:48 +01:00
Mark Harmstone 3fd9a423d4 ntdll: Take into account ordinal base when resolving forwarded ordinals.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:48 +01:00
Alexandre Julliard ec5925a8a2 ntdll: Set the additional environment variables from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:50:50 +01:00
Alexandre Julliard 5246f34a3e ntdll: Return an NT path for the initial current directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 17:42:20 +01:00
Zebediah Figura d144890c88 ntdll: Hold fd_cache_section while removing and closing handles.
Otherwise, it's possible for the old handle to be re-added to the cache between
removing and closing it.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura 64cfcc1c62 ntdll: Remove the source fd from the cache before calling the dup_handle request.
If another thread creates and accesses a file between the dup_handle request and
the call to remove_fd_from_cache(), the file may be allocated to the same handle
number, and that thread will then receive the wrong unix fd. Avoid this race by
invalidating the cache first.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura 5df0f5f6fb ntdll: Use a kernel APC to call NtDuplicateObject() if DUPLICATE_CLOSE_SOURCE is used on another process.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Alexandre Julliard ab8f0c3e21 ntdll: Load builtin dlls through NtMapViewOfSection().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard 49f12d65d8 ntdll: Don't return an existing address when mapping a builtin PE dll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00