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
Eric Pouech
db52588754
Const correctness.
2004-06-15 00:47:00 +00:00
Alexandre Julliard
ae42aad2ae
Initialize ntdll debugging earlier on so that we can trace the server
...
startup too.
2004-05-05 05:56:37 +00:00
Alexandre Julliard
174e2a6464
Reimplemented GetFileAttributesW, SetFileAttributesW and SetFileTime
...
using the corresponding ntdll functionality.
2004-04-20 00:36:29 +00:00
Alexandre Julliard
e792fb74ba
Implemented NtCreatelFile using the new symlink scheme.
...
Use NtCreateFile in the loader, and get rid of the CreateFileW upcall
hack.
2004-04-12 23:31:09 +00:00
Alexandre Julliard
670711ef25
Handle file mappings on removable media entirely inside ntdll.
2004-04-06 23:13:47 +00:00
Alexandre Julliard
a86a022256
Added workaround for broken dlls that modify ebx in their entry point
...
(reported by Christian Costa).
2004-03-19 02:07:16 +00:00
Mike Hearn
a54e3216c3
- Add debug SnoopFromInclude/SnoopFromExclude options.
...
- Correct TRACE debug channel usage in SNOOP_SetupDLL.
- Refactor check_relay_from_relay.
2004-03-16 03:10:07 +00:00
Alexandre Julliard
fe8ead56a8
Get rid of ntdll_get_process_heap and ntdll_get_process_pmts by using
...
standard APIs instead.
2004-03-12 01:59:35 +00:00
Alexandre Julliard
fc8b376a55
Return right away from import_dll when a dll is not found to avoid
...
displaying many useless function errors.
2004-02-24 01:25:03 +00:00
Alexandre Julliard
f19c9e7cdd
Get pointer to CreateFileW earlier on during startup.
...
Make sure we don't crash when loading a dll before the modref for the
main exe has been created.
2004-02-07 01:11:54 +00:00
Alexandre Julliard
3604824262
If supported by the linker, prevent the ELF loader from calling the
...
dll constructors at load time and call them from the dll entry point
instead.
2004-01-08 03:36:53 +00:00
Mike Hearn
5f5034ff3b
Print exe name when initialization fails.
2003-12-31 00:11:48 +00:00
Alexandre Julliard
0382aead65
Removed no longer used extra space allocated in the modref structure.
2003-12-03 20:28:41 +00:00
Alexandre Julliard
402b79a1e8
Porting fixes.
2003-11-27 00:59:36 +00:00
Alexandre Julliard
cba157e998
Better support for loading exe files as libraries.
...
Make sure kernel32 and ntdll have a full path name even though they
are loaded before we know the system dir.
2003-11-25 05:28:57 +00:00
Alexandre Julliard
16b4411669
Removed MODULE_GetLoadOrderA.
2003-11-25 01:03:04 +00:00
Alexandre Julliard
f9be2f3d21
Removed some unnecessary includes.
2003-11-17 20:31:29 +00:00
Alexandre Julliard
7924f421e9
Allocate the TEB and signal stack separately from the main stack.
...
Dynamically allocate the initial TEB too so that it is properly
page-aligned.
2003-11-04 04:50:18 +00:00
Alexandre Julliard
a062677a95
Allocate a memory view for builtin dlls so that VirtualQuery returns
...
something sensible.
2003-11-03 22:23:09 +00:00
Alexandre Julliard
8f1b861e27
Repaired relay debugging for kernel and ntdll (spotted by Uwe
...
Bonnes).
2003-10-28 00:25:32 +00:00
Alexandre Julliard
f9df57d94d
Call the application entry point from kernel32, some apps depend on
...
that.
2003-10-24 00:32:36 +00:00