Commit Graph

362 Commits

Author SHA1 Message Date
Alexandre Julliard c599ec1494 libwine: Make some loader functions obsolete.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard f391ae901e ntdll: Fix loading the main binary as PE file with an explicit dll override.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard 30e5f1215e kernel32: Remove __wine_kernel_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 18:24:32 +01:00
Alexandre Julliard 7ac7a902c8 ntdll: Implement RtlLocaleNameToLcid().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard 4538a137e0 ntdll: Move locale functions to a new locale.c file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard 83e520f556 kernel32: Move exec process functionality to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00
Alexandre Julliard b0199ea2fe ntdll: Load the main binary directly in ntdll when possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:24:19 +01:00
Alexandre Julliard 608d086f1b ntdll: Move some initializations out of thread_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 17:05:56 +01:00
Alexandre Julliard b7db0b52ce ntdll: Initialize earlier things that need the executable name.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 16:54:31 +01:00
Alexandre Julliard 3dadd980bf ntdll: Directly allocate the final process parameters structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 13:25:03 +01:00
Brendan Shanks aa51aee1a9 ntdll: Enable WoW64 filesystem redirection when loading libraries.
This matches the behavior seen on Windows 7/2008R2 and newer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47912
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-28 21:11:48 +01:00
Alexandre Julliard 075741b681 kernel32: Move image path name initialization to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:26 +02:00
Vijay Kiran Kamuju 1aff1e6a37 ntdll: Fix the SYSTEM_MODULE struct field names.
Based on https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/rtl/ldrreloc/process_module_information.htm?ts=0,44

Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 19:56:26 +02:00
Alexandre Julliard a5d45e9ae5 kernel32: Move exe path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:58:06 +02:00
Alexandre Julliard 619bd16e7a kernel32: Move dll path functions to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-03 22:56:14 +02:00
Alexandre Julliard a0a2b25a44 kernel32: Move Get/SetDllDirectory() implementation to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 5f938bb51b ntdll: Implement RtlGetSearchPath().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 15:14:08 +02:00
Alexandre Julliard 444933ae04 ntdll: Implement RtlSetSearchPathMode().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 09:43:27 +02:00
Sebastian Lackner b45d612549 ntdll: Execute queued APCs before starting a process.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35561
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Rémi Bernon 1aa963efd7 ntdll: Add alloc_type parameter to virtual_map_section and top_down to map_image.
NtMapViewOfSection also accepts the MEM_TOP_DOWN parameter that can
be used in combination with zero_bits to map memory on the highest
possible address.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:11:02 +02:00
Alexandre Julliard 9b6d2d3310 ntdll: Silence FIXME for LdrResolveDelayLoadedAPI().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
Fabian Maurer 6525a16673 ntdll: Check the activation context before looking for the module basename.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Alexandre Julliard 91bbc46c99 ntdll: Try to use the name of the PE file also when loading .so builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-24 10:50:53 +02:00
Alexandre Julliard a226e2b7a9 ntdll: Use .so builtin if found instead of falling back to the installed PE file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:47:34 +02:00
Zebediah Figura 90c3b78bec ntdll: Implement RtlCreateUserStack() and RtlFreeUserStack().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:50:10 +02:00
Alexandre Julliard c36b3d3e4a ntdll: Don't use native subsystem heuristic against builtin modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:15:31 +02:00
Alexandre Julliard 9019c12fac ntdll: Load the file we got when we can't locate the corresponding builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 21:40:55 +02:00
Alexandre Julliard 370abd32d1 ntdll: Add a helper function to load a dll from a .so file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 21:40:55 +02:00
Alexandre Julliard 295f10aa80 ntdll: Add a helper function to find a module from its dlopen handle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 17:26:35 +02:00
Alexandre Julliard d96fd000d3 ntdll: Fix off-by-one allocation error.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47311
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 10:28:29 +02:00
Alexandre Julliard 1943fb29bf ntdll: Don't pass DLL_WINE_PREATTACH to the TLS callbacks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 11:25:44 +02:00
Alexandre Julliard b8743f1f0b ntdll: Set LDR_WINE_INTERNAL flag also for PE builtins.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 10:15:17 +02:00
Alexandre Julliard 6c41cc6152 winebuild: Support relay debugging for PE builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 22:55:50 +02:00
Martin Storsjo 044461e8a6 ntdll: Avoid truncating a nonzero exit code to zero in unix.
On Windows, the exit codes can use the full 32 bit range, while
on unix, they are truncated to the lowest 8 bits. If the intended
exit code is nonzero, to indicate failure, but the lower 8 bits
are zero (like when winedbg tries to exit with EXCEPTION_WINE_STUB,
80000100), the observed exit code used to be zero, indicating
successful execution.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 22:04:39 +02:00
Nikolay Sivov 9fcb2c8822 ntdll: Account for null terminating char in unload traces (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:05:27 +02:00
Nikolay Sivov 5431409bd3 ntdll: Implement RtlGetUnloadEventTrace()/RtlGetUnloadEventTraceEx().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:44 +02:00
Alexandre Julliard 948fc85186 ntdll: Add support for loading PE builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:40:33 +02:00
Alexandre Julliard ea9cc97e2e ntdll: Only pass the NT path name to open_dll_file().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:36:39 +02:00
Alexandre Julliard f7cf3c1806 ntdll: Move open_dll_file() to avoid forward declarations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:34:55 +02:00
Alexandre Julliard 9f0d669239 ntdll: Rename attach_dlls() to LdrInitializeThunk().
Based on a patch by Andrew Wesie.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00
Alexandre Julliard 42df4dccd5 ntdll: Return the kernel process start address from __wine_kernel_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00
Alexandre Julliard a95d7f6c4f ntdll: Recreate the process parameters structure once everything has been initialized.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Alexandre Julliard 9839bb7691 ntdll: Skip dlls of the wrong machine type when searching through the load path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:31:40 +01:00
Alexandre Julliard 2062df7e6c ntdll: Use the image info to check for fake dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:31:39 +01:00
Alexandre Julliard f1bb3580e3 ntdll: Create the memory mapping for a dll directly at open time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:30:35 +01:00
Alexandre Julliard c946922a9c ntdll: Directly try to open the dll file instead of checking for existence first.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Alexandre Julliard 4880a5a0f4 ntdll: Pass a flag instead of a file handle to load_builtin_dll().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Alexandre Julliard f7b3120991 ntdll: Remove no longer used parameter from find_fileid_module().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 23:00:27 +01:00
Alexandre Julliard dc40bc85bc ntdll: Use NT filenames when loading dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:20:26 +01:00
Alexandre Julliard e24b16247d ntdll: Pass an NT filename to get_load_order().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:19:47 +01:00