Commit Graph

437 Commits

Author SHA1 Message Date
Alexandre Julliard a865a4f61d ntdll: Allocate 64-bit TEB and PEB in WoW64 mode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Alexandre Julliard 9018a37735 ntdll: Call virtual_set_large_address_space() directly from the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:38:40 +02:00
Alexandre Julliard 131e53a1fc ntdll: Avoid private Unix functions in RtlCreateUserStack().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-22 14:38:40 +02:00
Alexandre Julliard 0e45f7b4cd ntdll: Move various stub functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-20 20:14:41 +02:00
Alexandre Julliard 8a169390c9 ntdll: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:25:08 +02:00
Alexandre Julliard f89f7a54c2 ntdll: Support loading a PE-format ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-30 12:21:15 +02:00
Alexandre Julliard 43be3507c0 ntdll: Setup the main thread before initializing ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard 83a4549e9b ntdll: Remove support for being loaded directly from libwine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard 15c3eaafbb ntdll: Move retrieving the startup info to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Alexandre Julliard 38c78a9682 ntdll: Avoid some Unix dependencies.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 19:51:47 +02:00
Paul Gofman 1f6423f778 ntdll: Call TLS callbacks for main exe on thread detach.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 22:36:21 +02:00
Paul Gofman 1dc3383389 ntdll: Call TLS callbacks also for main exe on thread attach.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49007
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49098
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49041
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 22:36:19 +02:00
Alexandre Julliard 9b9845e43e ntdll: Move the system information functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:23:55 +02:00
Alexandre Julliard 577b392440 ntdll: Move searching for builtin dlls to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:15:53 +02:00
Alexandre Julliard 31538a79a9 ntdll: Move the loading of .so dlls to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 20:09:42 +02:00
Alexandre Julliard 99649d7892 ntdll: Add a common helper for building a modref.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-23 19:31:18 +02:00
Alexandre Julliard 9e3893cc29 ntdll: Use FSCTL_GET_OBJECT_ID to compare file identities.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 12:06:19 +02:00
Alexandre Julliard e84ec36a62 ntdll: Move the thread get/set information functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 14:48:15 +02:00
Alexandre Julliard e9e5c95058 ntdll: Move the process information functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-16 18:36:30 +02:00
Alexandre Julliard c3e2013b61 ntdll: Move the get/set file information functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-14 19:35:20 +02:00
Damjan Jovanovic f728a5f3f9 ntdll: Interpretation of l_addr depends on FreeBSD version.
FreeBSD changed l_addr to mean the relocation offset like it
does on other OSes, and provided a dynamic linker symbol,
"_rtld_version_laddr_offset", that can be used to check the
meaning.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:32:33 +02:00
Alexandre Julliard 552bc8aa47 ntdll: Move the wait on address implementation to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 15:47:30 +02:00
Alexandre Julliard 2333099c52 ntdll: Move signal handlers to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 15:25:52 +02:00
Alexandre Julliard 20c91c5e80 ntdll: Use NtContinue() to set the thread initial context.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-06 15:41:38 +02:00
Alexandre Julliard 4ffe39573b ntdll: Move mapping of the user shared data to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 22:36:38 +02:00
Alexandre Julliard cd0c598802 ntdll: Consolidate some of the init routines into the init_threading() entry point.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 22:36:38 +02:00
Alexandre Julliard c96ef78b6d ntdll: Move the virtual memory functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 17:19:12 +02:00
Alexandre Julliard 1a743c9af3 ntdll: Move fd cache functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Alexandre Julliard 8a63b688ac ntdll: Move server initialization functions to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Alexandre Julliard e854ea34cc ntdll: Create user shared data section in the server, and initialize it in wineboot.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 16:17:32 +02:00
Alexandre Julliard f5e703042a ntdll: Fix off-by-one buffer size error.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49262
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:08:12 +02:00
Alexandre Julliard ca13f489e1 ntdll: Make the windows directory a global variable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 17:06:04 +02:00
Alexandre Julliard e619429035 ntdll: Move configuration paths setup to the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-19 12:35:54 +02:00
Damjan Jovanovic 0fd3f0266e ntdll: Fix ELF initializer address calculations on FreeBSD.
dlinfo() doesn't conform to a standard, each platform implements in differently,
if at all. On GNU and NetBSD its l_addr field returned is the "relocbase",
the relative offset between addresses wanted by the file and addresses obtained
in memory (==0 when no relocation occurred), which we add to d_un.d_ptr to
obtain the memory address where the initializer is. On FreeBSD (and possibly
Solaris) this won't work, as l_addr is the "mapbase" instead, the absolute
starting memory address where the binary was loaded, resulting in wrong
calculations and crashes on startup as we call into wrong addresses.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49139
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 12:08:36 +02:00
Alexandre Julliard 45a63e5b3c ntdll: Store main() arguments in the Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-17 16:54:39 +02:00
Alexandre Julliard b7150570d3 ntdll: Allow ntdll.so to be loaded before wine_init() has run.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 23:12:31 +02:00
Alexandre Julliard b7b1ad0962 ntdll: Initial version of the ntdll.so Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 23:12:31 +02:00
Alexandre Julliard 6a12d93b88 ntdll: Handle already relocated .dynamic entries.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49139
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 20:59:36 +02:00
Alexandre Julliard 39e4b788d6 ntdll: Use the standard Interlocked* functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-02 15:10:04 +02:00
Alexandre Julliard ba1495f7c2 ntdll: Avoid using wine_dll_enum_load_path() from libwine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:35:39 +02:00
Alexandre Julliard 3e0c90e4c7 ntdll: Avoid using wine_get_build/data_dir() from libwine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:35:19 +02:00
Zebediah Figura ea753c384e include: Rename the other In*OrderModuleList fields to In*OrderLinks for consistency.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:49 +02:00
Zebediah Figura 09db718d99 include: Rename BaseAddress to DllBase.
To match Microsoft's public definition.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:46 +02:00
Zebediah Figura 4b3e820e07 include: Rename InMemoryOrderModuleList to InMemoryOrderLinks.
To match Microsoft's public definition.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:43 +02:00
Zebediah Figura feeb1c7c24 include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.
This name is used in Microsoft's public winternl.h.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:39 +02:00
Alexandre Julliard d2b70aa57a ntdll: Add a helper function to allocate module dependencies.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 16:02:10 +02:00
Alexandre Julliard 68e675d73d ntdll: The builtin load callback is no longer used for ntdll itself.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 15:51:23 +02:00
Alexandre Julliard 6f4272ce3e ntdll: Call TLS callbacks also for the main exe.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48971
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 14:14:40 +02:00
Alexandre Julliard 3872dc55ef ntdll: Support loading ntdll without a constructor.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 11:27:11 +02:00
Alexandre Julliard 0a72ec1dac ntdll: Make sure we don't try to attach the main exe a second time.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48961
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 11:23:15 +02:00