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
Alexandre Julliard
3099b04a89
ntdll: Return an NT filename in find_dll_file().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:18:16 +01:00
Alexandre Julliard
a6e4c814b6
ntdll: Use an NT filename to search for loaded modules.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:18:16 +01:00
Alexandre Julliard
6fb00db51e
ntdll: Don't use current directory for libraries unless explicitly specified in the search path.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Alexandre Julliard
c87aa2b9fc
ntdll: Support loading old runtime versions of IL-only images.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 15:29:53 +01:00
Alexandre Julliard
96eebec967
ntdll: Round header size to page boundary before checking it in PE header conversion.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 12:47:23 +01:00
Brendan McGrath
8cd569cf26
ntdll: Use 32bit when COM header marks it required.
...
Currently, when using wine64 to to load a .NET application which has the
32-bit required flag switched on, it fails with a c0000017 error
(ERROR_NOT_ENOUGH_MEMORY).
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 11:38:22 +01:00
André Hentschel
95fa795fa1
ntdll: Call system hook in LdrResolveDelayLoadedAPI when dll hook is missing.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46089
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 10:30:07 +01:00
Alexandre Julliard
926dd78069
ntdll: Convert PE header to 64-bit when loading a 32-bit IL-only module.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Alexandre Julliard
03e05c1f57
ntdll: Implement RtlSetUnhandledExceptionFilter().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-09 14:49:54 +02:00
Alexandre Julliard
2cab0ec389
server: Don't return the process exe file to the client.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 22:41:30 +02:00
Chip Davis
e6c6874ec3
ntdll: When an exception happens in DllMain(), print the code.
...
Also print exceptions from TLS callbacks.
Useful for debugging exceptions that prevent DLLs from loading.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-21 23:02:30 +02:00
Michael Stefaniuc
10f23ddb58
ntdll: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Michael Müller
4c13e1765f
ntdll: Implement LdrRegisterDllNotification and LdrUnregisterDllNotification.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-27 10:58:51 +02:00
Alex Henrie
760ca4c05f
ntdll: Add LdrRegisterDllNotification stub.
...
Based on a patch by Michael Müller.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-17 10:03:08 +02:00
Alexandre Julliard
52e09e823e
ntdll: Add support for loading IL-only dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-02 20:47:11 +02:00
Piotr Caban
47da086af9
ntdll: Change module load order so it matches InLoadOrderModuleList.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-14 16:41:52 +01:00
Alexandre Julliard
7aa6dcafbb
ntdll: Handle LOAD_LIBRARY_AS_IMAGE_RESOURCE modules when loading resources.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-06 09:15:29 -06:00
Alexandre Julliard
1cee60d068
ntdll: Check file identity in addition to file name to find a loaded module.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-28 17:24:36 +01:00
Alexandre Julliard
97b0907439
ntdll: Allow loading 32-bit IL-only binaries on 64-bit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-28 10:10:28 +01:00
Alexandre Julliard
6d6669fb2d
ntdll: Add a helper function to open a dll file.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-28 10:02:51 +01:00
Alexandre Julliard
8b35892b15
ntdll: Print a diagnostic when mscoree cannot be loaded.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-26 18:47:32 +01:00
Alexandre Julliard
39c8875ff8
ntdll: Add support for running IL-only .NET executables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-21 09:55:05 +01:00
Alexandre Julliard
12276796c9
ntdll: Hardcode the windows and system directories.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 19:38:29 +01:00
Alexandre Julliard
a8a74134e8
ntdll: Check for file mappings that cannot be loaded as dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 15:10:24 +01:00
Alexandre Julliard
9d911a5736
ntdll: Move suspending a thread on startup back to the platform-specific files.
...
This partially reverts f64d2688d2
.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 22:26:46 +01:00
Alexandre Julliard
8a62752fe9
ntdll: Use DWORDs for ARM assembly instructions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 19:20:10 +01:00
Alexandre Julliard
6fe15e6c41
ntdll: Round the pthread stack size to a page boundary.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-26 10:14:38 +01:00
Alexandre Julliard
f64d2688d2
ntdll: Move suspending a thread on startup into attach_dlls().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-01 20:32:12 +01:00
Alexandre Julliard
70b69f3e5f
ntdll: Don't return from attach_dlls on failure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-30 19:06:44 +01:00
Alexandre Julliard
afb16abc0f
ntdll: Add a platform-specific helper for starting a process.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-29 17:18:23 +01:00
Alexandre Julliard
f8e0bd1b0d
ntdll: Put the initial pthread stack at the end of the Win32 stack.
...
Create a separate view for it so that the main stack can be freed
independently.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-29 10:44:21 +01:00
Alexandre Julliard
822e142403
ntdll: Support magic \1 prefix in debug format for relay traces.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-25 12:05:40 +01:00
Alexandre Julliard
ed893d3591
ntdll: Delay attaching to dlls loaded because of a forwarded entry point.
...
Based on a patch by Sebastian Lackner.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-21 13:14:16 +01:00
Alexandre Julliard
8477ae27a8
ntdll: Fixup imports in the first thread that runs, even if it's not the main one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-20 20:24:39 +01:00
Alexandre Julliard
ab182dbf06
server: No longer store the mapping object in the dll structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-26 17:01:45 +02:00
Alexandre Julliard
8c103f298b
ntdll: Add support for setting a platform-specific initial context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 12:10:14 +02:00
Alexandre Julliard
9979c793e8
ntdll: Don't clear the last page of the initial stack.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 12:03:09 +02:00
Alexandre Julliard
a003f0aed8
ntdll: Store the kernel32 process entry point in a global variable.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-19 11:59:58 +02:00
Alexandre Julliard
94872cc84f
ntdll: Fix access rights checks for mapping objects.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 20:32:01 +02:00
Martin Storsjo
4eb2c5532d
ntdll: Simplify the arm version of a stub function.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 16:28:37 +02:00
Martin Storsjo
dd30536044
ntdll: Implement allocate_stub for arm64.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 16:28:14 +02:00
Martin Storsjo
114d8aded7
ntdll: Handle IMAGE_REL_BASED_DIR64 for arm64 in the same way as for x86_64.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Michael Müller
5a96399b66
ntdll: Implement LdrEnumerateLoadedModules.
...
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-01 19:29:13 +02:00
Andrew Wesie
06c5a9ab55
ntdll: Read entry point in LdrInitializeThunk.
...
Overwatch overwrites the PE header contents in a TLS callback. This results in
a crash on wine, because the entry point will be incorrect in start_process.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-09 21:37:08 +01:00
Ken Thomases
3d8efb2388
ntdll: For Mac 64-bit, poke NtCurrentTeb()->ThreadLocalStoragePointer to the corresponding offset from %gs.
...
64-bit Windows apps have hard-coded accesses to %gs:0x58 baked into them. They
need to find the ThreadLocalStoragePointer there.
Technically, the gsbase register and the memory it points to belong to the
pthread implementation on macOS. It's used for the pthread TLS implementation.
Slot 11 (offset 0x58) is currently used for the implementation of the ttyname()
system library function. We do not anticipate that Wine or any of the system
libraries or frameworks it uses will call ttyname(). Furthermore, Apple has
made it so that future releases of macOS will no longer use that slot. So, we
hijack it for our purposes.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 12:04:10 +09:00
Michael Müller
77be592845
ntdll: Do not sort InMemoryOrderModuleList by memory address.
...
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-07 21:23:26 +09:00
Sebastian Lackner
b89f88841e
ntdll: Skip unused import descriptors when loading libraries.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 12:22:34 +09:00
Jacek Caban
443c2a4719
ntdll: Pass SYNCHRONIZE flag in NtOpenFile and NtCreateFile calls.
...
This is needed by Office 2013, which hooks those functions and expects
flag to be set.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 20:36:17 +09:00
Alex Henrie
48f3bacb0b
ntdll: Avoid double initialization.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 22:25:39 +09:00
Dmitry Timoshkov
beeeb2a528
ntdll: Avoid path buffer re-allocation step for common dll name lengths.
...
For instance c:\windows\system32\advapi32.dll is 33 characters long with
0-terminator.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-10 19:43:11 +09:00
Dmitry Timoshkov
7d2cd2fe61
ntdll: Print process id in the loader log if requested.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2015-10-01 23:08:13 +09:00
Dmitry Timoshkov
7386de357f
ntdll: Do not fail to relocate an image if the size of relocation block is 0.
2015-08-20 14:32:32 +09:00
Dmitry Timoshkov
e67a00b466
ntdll: Separate image relocation from NtMapViewOfSection.
2015-08-18 19:56:48 +09:00
Sebastian Lackner
38076fa633
ntdll: Move cookie initialization code from memory management to loader.
2015-08-12 22:58:28 +09:00
Piotr Caban
18d9ca872a
ntdll: Fix modules order in InInitializationOrderModuleList.
2015-08-12 22:54:42 +09:00
Dmitry Timoshkov
21c3724813
ntdll: Cache contents of IMAGE_TLS_DIRECTORY instead of saving a directory pointer.
2015-07-15 15:13:16 +09:00
Sebastian Lackner
64ee8a4a53
ntdll: Do not omit mandatory argument for VirtualProtect.
2015-05-04 20:07:58 +09:00
Francois Gouget
ca1545cf17
ntdll: Remove unneeded NONAMELESSXXX directives.
2015-03-16 15:04:50 +09:00
Michael Müller
15d013067d
ntdll: Wait until builtin dlls are unloaded before releasing the virtual view.
2014-10-07 20:22:15 +02:00
Sebastian Lackner
5272ca241b
ntdll: Set ldr.EntryPoint for main executable.
2014-10-07 20:22:13 +02:00
Sebastian Lackner
636dc013cd
ntdll: Use call_dll_entry_point to execute TLS callbacks.
2014-09-08 16:03:38 +02:00
Sebastian Lackner
b7f77bb1fd
ntdll: Save more registers in call_dll_entry_point on i386.
2014-09-08 16:02:17 +02:00
Nikolay Sivov
5a8d73283c
ntdll: Fix LdrLockLoaderLock()/LdrUnlockLoaderLock() on 64bit.
2014-06-11 13:05:39 +02:00
Nikolay Sivov
97e2af1f73
ntdll: Implement non-blocking mode for LdrLockLoaderLock().
2014-05-16 10:52:52 +02:00
Alexandre Julliard
0e42fd97c0
ntdll: Detect 16-bit modules and resolve imports for them.
2014-02-25 16:08:24 -06:00
Alexandre Julliard
ff08cd597d
ntdll: Only allocate TLS data when resolving imports.
2014-02-17 20:16:08 +01:00
Alexandre Julliard
f5fc925f0e
ntdll: Move fixup_imports to avoid forward declarations.
2014-02-17 20:15:45 +01:00
Alexandre Julliard
0f0bf58663
ntdll: Don't fixup imports for executables.
2014-02-17 20:15:44 +01:00
Alexandre Julliard
7307298ac3
ntdll: Don't fixup imports when a dll is already loaded.
2014-02-17 20:15:43 +01:00
Martin Storsjo
48ae8f3070
ntdll: Improve handling of THUMB_MOV32 relocations.
2014-01-03 11:27:29 +01:00
Alexandre Julliard
e54503f708
ntdll: Allocate TLS data in all running threads on module load.
2013-12-23 18:39:58 +01:00
Alexandre Julliard
1a4eca6f16
ntdll: Allocate TLS slots dynamically on module load.
2013-12-23 18:39:58 +01:00
Alexandre Julliard
384d698a9e
ntdll: Allocate a separate pointer for each TLS slot.
2013-12-23 18:39:58 +01:00
Alexandre Julliard
e8eb781327
server: Check PE file architecture at mapping creation time.
2013-11-21 19:39:02 +01:00
André Hentschel
b6b9050d58
ntdll: Implement LdrResolveDelayLoadedAPI.
2013-11-12 12:58:03 +01:00
Frédéric Delanoy
416930d498
ntdll: Use BOOL type where appropriate.
2013-11-04 11:03:43 +01:00
Nikolay Sivov
146ff49161
ntdll: Support pinning module refcount with LdrAddRefDll().
2013-10-14 10:49:44 +02:00
Dmitry Timoshkov
c7afb0bb88
ntdll: Don't use asynchronous file IO in the loader.
2013-09-30 20:35:03 +02:00
Alexandre Julliard
3799d55d9b
ntdll: Implement RtlExitUserProcess.
2013-07-19 12:15:15 +02:00
Alexandre Julliard
1c11770159
ntdll: Simplify detach sequence now that there is no possible race on process exit.
2013-07-19 12:13:09 +02:00
André Hentschel
e187c4aec2
ntdll: Respect the 8-bit part in the ARM relocation.
2013-04-15 17:01:46 +02:00
Alexandre Julliard
cd03a51e7d
ntdll: Set the address space limit before running application code.
2013-04-04 13:28:43 +02:00
André Hentschel
0993f8bb7b
ntdll: Implement IMAGE_REL_BASED_THUMB_MOV32 relocation on ARM.
2013-01-21 12:51:14 +01:00
Alexandre Julliard
90e90e3b6a
ntdll: Make the page_size variable global.
2013-01-08 16:35:30 +01:00
Christian Costa
49d8b4c039
ntdll: Init retv to FALSE so in case of exception the trace shows the failure.
2012-10-01 12:05:48 +02:00
André Hentschel
33236819c8
ntdll: Add support for dynamically generated stub entry points on ARM.
2012-03-12 10:47:32 +01:00
Dmitry Timoshkov
0e85fc66de
ntdll: Use PAGE_EXECUTE_READ protection for an image section.
2012-01-24 18:10:31 +01:00
Jacek Caban
43a9faa734
ntdll: Make LdrLoadDll hotpatchable.
2012-01-06 19:24:23 +01:00
Dmitry Timoshkov
26f4ff1a38
ntdll: Use PAGE_EXECUTE_READWRITE protection when allocating stubs.
2011-11-08 10:19:42 +01:00
Dmitry Timoshkov
df9a086865
ntdll: Use PAGE_READWRITE access when resolving DLL imports.
2011-11-03 13:35:11 +01:00
Alexandre Julliard
f4024eaa49
ntdll: Fetch the windows directory from the shared user data.
2011-06-16 12:29:21 +02:00
Marcus Meissner
0f0692716b
ntdll: Mark FILE_umask with hidden visibility.
2011-05-27 12:21:39 +02:00
Alexandre Julliard
900352bc6b
server: Store a mapping instead of a file for process dlls.
2011-04-18 14:45:32 +02:00
Alexandre Julliard
e272b31b6b
ntdll: Ensure alignment of static TLS data and free it at thread exit.
2010-12-15 13:16:55 +01:00
Marcus Meissner
2ca5513a62
ntdll: Set correct protection flags on sections in builtin DLLs.
2010-08-24 17:22:32 +02:00
Jacek Caban
9713d62e89
ntdll: IMAGE_REL_BASED_HIGH, IMAGE_REL_BASED_LOW and IMAGE_REL_BASED_HIGHLOW should be supported on win64.
2010-08-20 13:21:27 +02:00
Alexandre Julliard
28e1398237
ntdll: Set a valid process title for the initial process.
2010-06-08 11:55:23 +02:00
Mikhail Maroukhine
2b8f11b8c0
ntdll: Fix compiler warnings with flag -Wcast-qual.
2010-03-29 12:15:28 +02:00
Alexandre Julliard
83c272a258
ntdll: Return STATUS_IMAGE_NOT_AT_BASE when an image mapping has to be relocated.
2010-03-03 20:05:40 +01:00
Alexandre Julliard
9055e9e3dd
ntdll: Set the heap debug flags based on the GlobalFlag value.
2010-01-22 12:33:03 +01:00
Alexandre Julliard
39a1227cdb
ntdll: Load the various PEB global options at startup.
2010-01-20 17:30:00 +01:00
Alexandre Julliard
1c119dad6d
ntdll: Implement LdrQueryImageFileExecutionOptions and use it to retrieve the per-process global flag.
2010-01-20 17:11:03 +01:00
Nikolay Sivov
dbbd2161ab
ntdll: Call DLL_PROCESS_DETACH if attaching failed.
2009-11-30 12:53:30 +01:00
Alexandre Julliard
4e77222820
ntdll: Move the window and system dir variables to directory.c
2009-10-22 19:55:06 +02:00
Andrey Turkin
7aeaa0338c
ntdll: Run TLS callbacks in zero-sized TLS directories.
2009-10-12 12:14:21 +02:00
Alexandre Julliard
135612d22f
ntdll: Add support for ordinal forwards.
2009-09-25 13:12:02 +02:00
Alexandre Julliard
c39e28edfb
ntdll: Support both 32-bit and 64-bit modules in RtlImageDirectoryEntryToData.
2009-09-25 12:46:39 +02:00
Michael Karcher
be90ae2fc3
ntdll: Fix DEP status initialization.
2009-09-15 16:41:23 -05:00
Alexandre Julliard
c9d85dd576
ntdll: Route the process startup through the platform-specific thread startup code.
2009-08-29 11:24:44 +02:00
Alexandre Julliard
b76dc21b82
ntdll: Ignore activation context entries that don't specify a path.
2009-08-05 11:23:16 +02:00
Alexandre Julliard
09712593c8
ntdll: Release some address space after the process initialization is done.
2009-06-25 14:33:34 +02:00
Alexandre Julliard
0c46341543
ntdll: Add call frame annotations in x86 assembly code.
2009-06-25 12:05:09 +02:00
Nikolay Sivov
ae8999f982
ntdll: Call NtCreateSection with NULL attributes loading native dll.
2009-06-08 12:42:55 +02:00
Michael Stefaniuc
d2f6f56873
ntdll: Remove superfluous pointer casts.
2009-03-23 12:40:53 +01:00
Alexandre Julliard
1056771b91
ntdll: Allocate the stack for all threads, don't rely on pthread to do it for us.
2009-02-23 14:24:59 +01:00
Alexandre Julliard
36334a1b5a
ntdll: Call pthread_sigmask directly instead of through the pthread function table.
2009-02-20 18:07:41 +01:00
Alexandre Julliard
947976f22c
server: Store module names as client_ptr_t instead of void pointers.
2008-12-29 17:10:11 +01:00
Alexandre Julliard
f2c4e09e80
server: Make module handles always 64-bit.
2008-12-29 16:47:51 +01:00
Maarten Lankhorst
72423f5f6d
ntdll: Make the loader process relocations correctly for x86_64.
2008-12-26 13:42:07 +01:00
Maarten Lankhorst
70441d5bb8
kernel32: Change all functions to use CDECL.
2008-12-23 13:09:45 +01:00
Maarten Lankhorst
768160e944
ntdll: Make all exported wine functions CDECL.
2008-12-17 15:02:25 +01:00
Alexandre Julliard
ccdfa4941e
ntdll: Add support for dynamically generated stub entry points.
...
Based on a patch by Maarten Lankhorst.
2008-12-16 12:25:07 +01:00
Alexandre Julliard
a2089abd94
ntdll: Enforce correct protection values in virtual memory functions.
2008-12-11 14:05:42 +01:00
Alexandre Julliard
b8e8cb6621
ntdll: Add a heuristic to detect dlls that are wrongly marked as using native subsystem.
2008-12-11 12:18:35 +01:00
Alexandre Julliard
d1b3d484f7
server: Add functions for conversions between server object handles and pointer-style handles.
2008-12-08 16:05:17 +01:00
Alexandre Julliard
92cf3d1900
ntdll: Don't set noexec protection on builtin dlls, some broken apps clear the execute permission.
2008-11-17 15:56:54 +01:00
Alexandre Julliard
a0c4bfef9d
ntdll: Add private function to manage system virtual views instead of abusing NtAllocateVirtualMemory.
2008-11-14 17:40:54 +01:00
Alexandre Julliard
2e25b859ea
ntdll: Don't call the dll entry point for native modules.
2008-11-10 13:20:45 +01:00
Alexandre Julliard
4ee2d9d8eb
ntdll: Initialize the large address space before attaching dlls.
2008-11-03 13:34:12 +01:00
Alexandre Julliard
58d076b419
ntdll: Force execute permission again on the stack after clearing it.
2008-06-26 21:10:57 +02:00
Alexandre Julliard
c9504d9447
ntdll: Move signal unmasking to make sure injected code runs on the correct stack.
2008-05-20 10:59:20 +02:00
Alexandre Julliard
fca6067748
ntdll: Implemented LdrProcessRelocationBlock.
2008-04-02 20:38:51 +02:00
Alexandre Julliard
600694546f
ntdll: Moved stack allocation for thread and process to a common routine in virtual.c.
2008-04-01 14:11:44 +02:00
Alexandre Julliard
9b49cc2899
ntdll: Clear the process stack again after dll init and before calling the main entry point.
2008-03-26 17:08:57 +01:00
Alexandre Julliard
7a7ef6a64c
kernel32: Moved the allocation of the process stack to ntdll.
2008-03-26 17:08:38 +01:00
Alexandre Julliard
96fc6e317e
ntdll: Fixed handling of fake dlls when loading a builtin. Reported by Jacek Caban.
2008-03-05 12:21:19 +01:00
Alexandre Julliard
254c17f841
ntdll: Only grab the loader lock once we actually call external functions.
2008-03-01 13:30:34 +01:00
Rob Shearman
8608e895eb
Add a new convenience macro for an exception handler that handles all exceptions.
...
When using native compiler exceptions, the previous method of doing
this, __EXCEPT(NULL), would expand to __except(
(NULL)(GetExceptionInformation())) which doesn't compile as NULL isn't a
function.
So add a new macro, __EXCEPT_ALL, which works correctly both when using
native compiler exceptions and without and which makes the meaning of
code in which it is used clearer.
2008-02-16 14:58:24 +01:00
Rob Shearman
0d9e09d8bf
ntdll: Add an exception handler around calls to module entry points.
...
Change the return value from BOOL to NTSTATUS so that we can return the
exception code to the caller.
2008-02-15 09:59:55 +01:00
Alexandre Julliard
78fba54ab7
ntdll: Store the unhandled exception filter at startup to avoid race conditions.
2008-02-12 22:39:19 +01:00
Alexandre Julliard
0861141725
ntdll: Support delayed loading of modules referenced by forwarded entry points.
2007-12-06 21:43:54 +01:00
Alexandre Julliard
0f5fc117a2
ntdll: Unblock signals in process init only after the dlls have been imported.
2007-11-19 14:27:07 +01:00
Alexandre Julliard
c70a17dbd9
ntdll: Send the exit code to the server on failed initialization.
2007-11-19 14:26:05 +01:00
Alexandre Julliard
35c91324ea
ntdll: Initialize the PEB LoaderLock pointer.
2007-11-19 13:56:26 +01:00
Detlef Riekenberg
2be2c1acc5
ntdll: Dump the base address when a module is loaded.
2007-10-26 15:14:21 +02:00
Detlef Riekenberg
3e83b75038
ntdll: Avoid segfault with snoop for exefiles with a broken export table.
2007-09-26 12:15:14 +02:00
Alexandre Julliard
e22ce46278
ntdll: Pin down all dlls imported by the main exe.
2007-08-30 16:34:27 +02:00
Alexandre Julliard
5b6bb63adb
ntdll: Load dll from the directory containing the manifest for local assemblies.
2007-07-31 20:31:42 +02:00
Alexandre Julliard
4e4c150bed
ntdll: Avoid activation context leak for dlls with no imports.
2007-07-30 23:37:39 +02:00
Alexandre Julliard
b67b66d7b3
ntdll: Fix a compiler warning.
2007-07-30 14:46:09 +02:00
Alexandre Julliard
e06eaa49ae
ntdll: Activate the module's activation context while resolving imports and attaching.
2007-07-26 11:06:17 +02:00
Alexandre Julliard
76bd190a72
ntdll: Use activation contexts information to load dlls (based on a patch by Jacek Caban).
2007-07-26 11:05:32 +02:00
Alexandre Julliard
4156a716b0
ntdll: Create the per-module activation context at module load time.
2007-07-25 16:50:32 +02:00
Alexandre Julliard
270f725526
ntdll: Create the process activation context at initialization time.
2007-07-25 16:48:40 +02:00
Jacek Caban
125e710ff1
ntdll: Store the windows directory too.
2007-07-19 18:22:43 +02:00
Michael Stefaniuc
bf6a96ca66
ntdll: Fix missing unlock on error path. Found by Smatch.
2007-07-02 13:34:29 +02:00
Alexandre Julliard
5817e36634
ntdll: Improved the stub behavior of NtQuerySystemInformation(SystemModuleInformation).
2007-06-19 16:58:42 +02:00
Dmitry Timoshkov
e142779b09
ntdll: Fix compilation warnings in 64-bit mode.
2007-05-23 13:10:20 +02:00
Alexandre Julliard
5aa70b3d80
ntdll: Setup the shared user data structure at 0x7ffe0000.
2007-05-18 18:09:03 +02:00
Alexandre Julliard
447fda5206
ntdll: Implemented LdrAddRefDll.
2007-05-16 16:39:29 +02:00
Alexandre Julliard
b64530eee4
ntdll: Reimplement LdrGetDllHandle to use the same search algorithm as LdrLoadDll.
2007-05-16 16:35:43 +02:00
Andrew Talbot
9fe3b60f12
ntdll: Exclude unused headers.
2007-05-15 12:19:31 +02:00
Andrew Talbot
0108667754
ntdll: Replace inline static with static inline.
2007-03-17 20:03:57 +01:00
Dmitry Timoshkov
e8bba26c80
ntdll: Catch the exceptions in the TLS callback like Windows does.
2007-03-13 12:47:38 +01:00
Alexandre Julliard
8891d6de48
ntdll: Block async signals during process init and thread creation.
2007-01-18 12:23:04 +01:00
Joel Parker
2319999a05
Remove redundant semicolons for ANSI compatibility.
2007-01-17 11:58:15 +01:00
Alexandre Julliard
5bd513640b
ntdll: Moved the check for removable file in load_dll to the server.
2007-01-12 14:42:43 +01:00
Alexandre Julliard
2a1dc15790
ntdll: Fix the libdl refcount when loading the same builtin twice.
2006-12-20 15:54:27 +01:00