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