Commit Graph

422 Commits

Author SHA1 Message Date
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
Alexandre Julliard 7ae1b2897e ntdll: Check the NX compatibility flag for every loaded module. 2006-12-07 20:52:16 +01:00
Alexandre Julliard 822be6c90f ntdll: Force exec permissions on all mmaps unless the app is marked NX-compatible. 2006-12-05 15:42:29 +01:00
Alexandre Julliard 84fb1e1f3f ntdll: Allow module with extensions in forward specifications. 2006-12-04 13:37:32 +01:00
Alexandre Julliard bda2832d8d ntdll: Moved command-line help to the loader binary. 2006-11-06 13:04:56 +01:00
Alexandre Julliard c9b5569bc2 ntdll: Added implementation of RtlDllShutdownInProgress. 2006-11-03 13:52:02 +01:00
Hans Leidekker f7b0ba7aa7 ntdll: Win64 printf format warning fixes. 2006-10-18 12:35:26 +02:00
Alexandre Julliard 6f7b1f6463 ntdll: Move the calling of the process entry point back to kernel32.
Apparently some copy protection stuff relies on that.
This reverts commit 50fca716fd.
2006-07-31 21:25:29 +02:00
Alexandre Julliard d16c7f96c9 ntdll: Set initial module refcount to 1 to avoid unloading during imports fixup. 2006-07-31 21:03:01 +02:00
Alexandre Julliard 50fca716fd ntdll: Moved the calling of the process entry point to LdrInitializeThunk. 2006-07-13 14:58:04 +02:00
Eric Pouech 201f469512 ntdll: Free TLS pointers when exiting thread. 2006-05-27 13:00:33 +02:00
Alexandre Julliard 9769806c3a ntdll: Implemented RtlPcToFileHeader. 2006-05-27 10:55:48 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Alexandre Julliard f5d3adaf59 ntdll: Process --help and --version args earlier on during startup. 2006-04-03 12:07:20 +02:00
Alexandre Julliard c307f4990f ntdll: Added a DLL_WINE_PREATTACH call to DllMain for builtins.
By returning FALSE from this call, a builtin dll can specify that we
should try to load the native one instead.
2006-03-21 15:10:22 +01:00
Alexandre Julliard 2f2819466b ntdll: Detect the fake dlls created by setupapi and refuse to load them. 2006-03-21 11:31:23 +01:00
Alexandre Julliard ac60251312 ntdll: In MODULE_FlushModrefs, also free dlls that haven't been initialized yet. 2006-03-18 18:41:21 +01:00
Alexandre Julliard 0335a4b910 ntdll: Don't reset the load count when reusing a builtin modref. 2006-02-28 12:41:25 +01:00
Alexandre Julliard 4107751dd3 ntdll: Simplify loadorder code by using an enum instead of an array
to represent load order values.
Added a special value for default load order so that we can handle it
differently later on.
2006-02-22 16:30:05 +01:00
Alexandre Julliard 477b3bf566 kernel: Moved the get_startup_info call to ntdll. 2006-02-22 09:57:19 +01:00
Alexandre Julliard e27358ea5c server: Remove no longer needed fields in the init_process_done request. 2006-02-21 20:08:19 +01:00
Alexandre Julliard 2df3ad64eb kernel: Use LoadLibrary to load the main exe in all cases. 2006-02-21 19:48:18 +01:00
Alexandre Julliard ca311b3f4c ntdll: Support loading a builtin under a different name.
Find the proper modref in that case based on the dlopen handle.
2006-02-21 19:43:22 +01:00
Alexandre Julliard fa5b5102d7 ntdll: Moved LDR_DONT_RESOLVE_REFS handling into fixup_imports.
This ensures that we never fixup imports twice on the same dll.
2006-02-21 19:32:26 +01:00
Alexandre Julliard 68ea200f32 ntdll: Support loading builtin dlls with an explicit path name also
when loadorder is set to builtin only.
2006-02-21 11:56:16 +01:00
Uwe Bonnes 19e29d6035 ntdll: Remove spaces at end of name in import_dll. 2006-02-21 11:50:23 +01:00
Alexandre Julliard 69089152d1 ntdll: Better handling of errors when loading a builtin dll from an
existing file.
2006-02-09 12:15:57 +01:00
Alexandre Julliard 9669ff8de4 ntdll: Get rid of the main_file argument in LdrInitializeThunk. 2006-02-08 15:22:24 +01:00
Alexandre Julliard 1d23e7fee2 ntdll: Check for existing modref for the main exe before creating it
in LdrInitializeThunk.
2006-02-08 15:10:56 +01:00
Alexandre Julliard a458f3e538 ntdll: Support loading a builtin dll by specifying an explicit path to
the .so file.
2006-02-07 21:16:25 +01:00
Eric Pouech e66e227dbe Fixes for missing prototypes warnings. 2006-02-06 13:13:28 +01:00
Robert Shearman 2d08465b81 ntdll: Loader optimization.
Optimize for the case where a DLL with no path is requested and it is
already loaded.
2006-01-18 14:22:19 +01:00
Alexandre Julliard 45a4e5439b Set refcount to -1 on implicitly loaded dlls to avoid unloading them
(suggested by Michael Ost).
2006-01-04 14:55:33 +01:00
Alexandre Julliard 5dc6d95952 ntdll: New implementation of relay thunks.
New implementation of relay thunks that doesn't require modifying code
on the fly, so that the thunks can be put in the text section.
Some performance improvements.
2005-12-18 10:45:01 +01:00
Alexandre Julliard ae964ac801 Take advantage of the __EXCEPT_PAGE_FAULT macro. 2005-12-16 17:17:57 +01:00
Alexandre Julliard 4cbf118d88 Check for a valid module before attempting to read the export
directory in LdrGetProcedureAddress.
2005-11-29 17:10:30 +01:00
Ge van Geldorp 1a1583a364 Match PSDK STATUS_* definitions. 2005-11-28 17:32:54 +01:00
Alexandre Julliard cc01e8ff05 Preserve 16-byte stack alignment in the various assembly
functions. Needed for MacOSX.
2005-11-23 19:55:06 +01:00
Alexandre Julliard cb443bdb04 Attach to implicitly loaded builtin dlls on process startup. 2005-10-26 12:12:44 +00:00
Alexandre Julliard c2bb910877 Ignore the size of the import directory, process imports until we find
a null entry.
2005-10-04 15:54:55 +00:00
Alexandre Julliard 884599112e Use SIZE_T instead of ULONG for the size arguments of the virtual
memory functions.
2005-09-12 10:36:06 +00:00
Alexandre Julliard 20a1a203c6 Use a more portable scheme for storing the name of a critical
section.
2005-09-09 10:19:44 +00:00
Mike McCormack b5bd4a101a Fix gcc 4.0 warnings. 2005-09-02 14:47:36 +00:00
Alexandre Julliard bba5423d0f Uncomment out DisableThreadLibraryCalls in DllMain and add the
kernel32 imports that it requires.
2005-08-29 15:11:37 +00:00
Alexandre Julliard b480a3c544 Removed a redundant and possibly wrong warning. 2005-08-12 16:02:42 +00:00
Alexandre Julliard 915aebb852 Moved the version initialization to ntdll.
Properly set the version fields in the PEB.
Removed some no longer used structures.
2005-08-10 13:12:27 +00:00
Alexandre Julliard 31dd4af57d Don't call process attach notification during process shutdown.
Make sure we don't insert a module in the same list twice.
2005-08-09 20:45:46 +00:00
Kevin Koltzau 6873379991 Define 64bit PE structures. 2005-07-19 11:44:32 +00:00
Alexandre Julliard 3be8cb8b02 Moved initialization of the default user process parameters to ntdll. 2005-07-14 12:33:30 +00:00
Alexandre Julliard 11ad6a0ac4 Return the startup info size in the init_thread request, and allocate
the process parameters structure in ntdll instead of kernel.
2005-07-13 19:43:35 +00:00
Alexandre Julliard d3a6a16efd Initialize relay debugging earlier on now that the registry is loaded
by the server.
2005-07-13 14:23:06 +00:00
Mike McCormack 6b636e3e7b Use RTL_CRITICAL_SECTION instead of CRITICAL_SECTION. 2005-06-25 18:00:57 +00:00
Mike McCormack 04f9f1b066 Don't include winbase.h or winerror.h when not necessary. 2005-06-21 09:52:40 +00:00
Mike McCormack 5b2d5fd758 Use HANDLE instead of HKEY in the NT API. 2005-06-17 13:58:33 +00:00
Alexandre Julliard 73f6718134 Allocate the system view for builtin modules earlier in
load_builtin_callback so that we also create one for the main
executable.
2005-06-05 18:22:02 +00:00
Alexandre Julliard 7016b99972 Moved the loaddll trace into the load_builtin_dll function so that it
gets printed even when we don't get the expected so file.
2005-05-23 10:33:34 +00:00
Alexandre Julliard b3e0a032ce Moved entry point definitions from module.h to kernel16_private.h. 2005-05-18 18:27:54 +00:00
Alexandre Julliard 4de9cfd1cd Moved import tracing to a separate channel so that +module traces
don't contain too much noise.
2005-05-18 09:51:46 +00:00
Vincent Béron 0bdac8c0f9 Use "" for Windows includes in dlls, instead of <>. 2005-03-21 10:52:26 +00:00
Dmitry Timoshkov 75b93ff1aa Match OVERLAPPED structure to the SDK definition. 2005-03-17 19:00:08 +00:00
Dmitry Timoshkov 0497af09a7 Match RaiseException and EXCEPTION_RECORD to SDK definitions. 2005-02-24 13:15:36 +00:00
Ivan Leo Puoti d3edafe1e2 Replace GetCurrentProcess() with NtCurrentProcess() in ntdll. 2005-02-22 19:33:50 +00:00
Ivan Leo Puoti bfef6208a2 Added NtLoadDriver and NtUnloadDriver stubs. 2005-01-24 12:49:53 +00:00
Mike Hearn bef1336667 Give a more informative error when a DLL fails to initialize during
startup.
2005-01-11 16:01:31 +00:00
Alexandre Julliard d5088668de Generate stub entries on the fly for missing entry points instead of
returning a deadbeef pointer.
2004-12-14 20:03:23 +00:00
Alexandre Julliard b98c2e3847 Append .dll extension in all cases (spotted by Mike Hearn). 2004-11-23 14:03:49 +00:00
Alexandre Julliard fac7a5ab8b Free the memory view before we unload a builtin dll to avoid a race
condition.
2004-11-06 03:54:23 +00:00
Robert Shearman 2050591370 Fix NtAllocateVirtualMemory declaration and fix users of the
function.
2004-10-11 20:59:06 +00:00
Mike McCormack d80eb97b29 Use FILE_SHARE_DELETE when loading modules, as running an exe that's
going to be deleted should work.
2004-09-15 18:02:49 +00:00
Alexandre Julliard 60f0439ba6 Make relay and snooping work for LoadLibrary+GetProcAddress sequence
(based on a patch by Dmitry Timoshkov).
2004-08-02 22:25:01 +00:00
Alexandre Julliard 9f58ee709d Set the system directory in ntdll as soon as we have determined it. 2004-07-15 22:07:21 +00:00
Filip Navara fc51760f48 Unprotect Import Address Table while filling it. 2004-06-22 02:07:47 +00:00
Alexandre Julliard fd9792bdc9 Added support for the IMAGE_FILE_LARGE_ADDRESS_AWARE flag. 2004-06-18 00:26:57 +00:00