Commit Graph

473 Commits

Author SHA1 Message Date
Alexandre Julliard 3f3f673c29 ntdll: Print the version mismatch error from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 22:54:09 +01:00
Alexandre Julliard 37600028fc ntdll: Check the prefer-native flag in the PE header for default load order.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 11:11:22 +01:00
Alexandre Julliard 58eceff167 ntdll: Don't use wine/server.h from the PE side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 23:01:37 +01:00
Alexandre Julliard c2c57e8dba ntdll: Use the SECTION_IMAGE_INFORMATION bitfields where possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 21:20:47 +01:00
Alexandre Julliard e7fa4fd147 server: Remove the load/unload_dll requests and the dll list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 16:31:30 +01:00
Alexandre Julliard 7163c78234 ntdll: Close the debug port on thread exit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 16:31:30 +01:00
Alexandre Julliard 4f2ed66a5f server: Use TEB->ArbitraryUserPointer to store the loaded dll names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 11:49:41 +01:00
David Koolhoven 4f7a4146cd ntdll: Don't try to convert module to 64-bit if it doesn't contain code.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50647
Signed-off-by: David Koolhoven <david@koolhoven-home.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 09:20:46 +01:00
Alexandre Julliard d7bdd5a554 ntdll: Pass the full NT path name to load_builtin_dll().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-09 13:23:17 +01:00
Alexandre Julliard 80898bfee0 ntdll: Fix loading of section table in get_cor_header().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50613
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:02 +01:00
Alexandre Julliard 123023eac7 server: Fetch the data for the debug events from the process memory views.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:12:56 +01:00
Alexandre Julliard 72baffdb6d ntdll: Load the main module before the other dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 10:12:16 +01:00
Alexandre Julliard 5fef775ddf ntdll: Delay mapping a module until we have found the final one to load.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-23 16:50:35 +01:00
Alexandre Julliard 63b6295368 ntdll: Check for valid architecture before mapping the module.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-23 11:30:55 +01:00
Alexandre Julliard 7203ad0ecd ntdll: Load the COR header directly from the file handle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-23 11:30:55 +01:00
Zebediah Figura 16592ca918 ntdll: Set the process detaching flag before calling FLS callbacks.
So that we will not deadlock trying to acquire fls_section.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-07 21:21:14 +01:00
Paul Gofman c181a0ad59 ntdll: Use WINAPI calling convention for stub_entry_point().
Otherwise it ends up being stdcall function in the gcc PE build and
cdecl in ELF while allocate_stub() currently assumes cdecl.

Fixes missing function details output on x64.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-29 21:08:32 +01:00
Michael Stefaniuc 636d398c7d ntdll: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 09:37:42 +01:00
Zebediah Figura 74ec9773dd ntdll: Use a dynamically allocated buffer in find_forwarded_export() if necessary.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50105
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-23 21:05:04 +01:00
Paul Gofman ec1ea1ea1b ntdll: Call FLS callbacks.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 22:30:05 +02:00
Paul Gofman 87ea7698ab ntdll: Allocate TEB FLS data in LdrInitializeThunk().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:30 +02:00
Paul Gofman 905deff5da ntdll: Reimplement FLS data management on top of up to date structures.
Win10 18132 introduced increased FLS data limit and entirely changed
underlying structure.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:29 +02:00
Paul Gofman 36981ad033 ntdll: Introduce RtlProcessFlsData() and use it for FLS data destruction.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:29 +02:00
Alexandre Julliard e5c0e8e296 ntdll: Use load_dll() to load kernel32 to support PE format.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard a014f413d6 ntdll: Add support for loading a Unix helper library from builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 13:41:28 +02:00
Alexandre Julliard 4c45348f78 ntdll: Get rid of the exec_process() Unix library callback.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:24:01 +02:00
Alexandre Julliard f51cd0a1b5 ntdll: Use the process parameters directly in exec_process().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:09:33 +02:00
Alexandre Julliard 9e973954fd ntdll: Get rid of the server_init_process_done() Unix library callback.
This time without setting Eip to 0.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 18:40:08 +02:00
Alexandre Julliard f7e4fd0cf8 kernel32: Remove the no longer used __wine_start_process() function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard 1a9558cf9b ntdll: Call the thread entry point through BaseThreadInitThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard 2b40969c58 kernel32: Move the initial process breakpoint to LdrInitializeThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 11:36:24 +02:00
Alexandre Julliard 2b9a0550bc Revert "ntdll: Get rid of the server_init_process_done() Unix library callback."
This partially reverts commit 1581fb619b.
Steam wants Eip to be valid even before LdrInitializeThunk.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 21:08:45 +02:00
Alexandre Julliard 65c37cee24 ntdll: Use exported APIs instead of virtual_map_section() to load PE modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 14:16:54 +02:00
Alexandre Julliard 1581fb619b ntdll: Get rid of the server_init_process_done() Unix library callback.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 13:04:09 +02:00
Alexandre Julliard 4e5811637a ntdll: Use syscalls for the server functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:55:40 +02:00
Alexandre Julliard 4a7cd0f492 ntdll: Call NtContinue() from LdrInitializeThunk() instead of returning.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:23:44 +02:00
Alexandre Julliard a865a4f61d ntdll: Allocate 64-bit TEB and PEB in WoW64 mode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Alexandre Julliard 9018a37735 ntdll: Call virtual_set_large_address_space() directly from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:38:40 +02:00
Alexandre Julliard 131e53a1fc ntdll: Avoid private Unix functions in RtlCreateUserStack().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:38:40 +02:00
Alexandre Julliard 0e45f7b4cd ntdll: Move various stub functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 20:14:41 +02:00
Alexandre Julliard 8a169390c9 ntdll: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:25:08 +02:00
Alexandre Julliard f89f7a54c2 ntdll: Support loading a PE-format ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:21:15 +02:00
Alexandre Julliard 43be3507c0 ntdll: Setup the main thread before initializing ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard 83a4549e9b ntdll: Remove support for being loaded directly from libwine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard 15c3eaafbb ntdll: Move retrieving the startup info to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard 38c78a9682 ntdll: Avoid some Unix dependencies.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Paul Gofman 1f6423f778 ntdll: Call TLS callbacks for main exe on thread detach.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 22:36:21 +02:00
Paul Gofman 1dc3383389 ntdll: Call TLS callbacks also for main exe on thread attach.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49007
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49098
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49041
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 22:36:19 +02:00
Alexandre Julliard 9b9845e43e ntdll: Move the system information functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:23:55 +02:00
Alexandre Julliard 577b392440 ntdll: Move searching for builtin dlls to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:15:53 +02:00