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
Gerald Pfeifer
973138c068
ntdll: Fix call_constructor build on FreeBSD.
...
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 12:49:11 +02:00
Alistair Leslie-Hughes
ccce5f769d
ntdll: Correct compile error under macos.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 14:15:13 +02:00
Alexandre Julliard
081c8e1c73
ntdll: Execute .so constructors during module initialization.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard
3935acd4da
ntdll: Use a Wine-specific field in WINE_MODREF for the .so handle.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard
0a3e42e271
ntdll: Load .so builtin modules without using libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard
6ac357667e
ntdll: Support loading builtin modules that don't use a constructor.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 19:50:21 +02:00
Alexandre Julliard
a55feef63a
ntdll: Always use the loaded path as builtin module file name.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 22:04:07 +02:00
Alexandre Julliard
19c48204bb
ntdll: Allow the module file name to not be null-terminated.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 21:59:19 +02:00
Alexandre Julliard
fd7992972b
ntdll: Don't call entry point for the main process so that we don't need to check the dll flag.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48817
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 12:55:38 +02:00
Alexandre Julliard
f64e34b014
ntdll: Use standard dlopen() instead of the libwine wrappers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:19 +02:00
Nikolay Sivov
064c7bdbb4
ntdll: Fix trace pointer returned from RtlGetUnloadEventTraceEx().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 11:41:05 +02:00
Alexandre Julliard
e003b9884e
ntdll: Use wcslen() instead of strlenW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard
4b5cd5e66d
ntdll: Use wcstoul() instead of strtoulW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard
285c5490a4
ntdll: Use wcsrchr() instead of strrchrW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard
6de0ab276b
ntdll: Use wcschr() instead of strchrW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard
80005ee016
ntdll: Use wcscat() instead of strcatW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard
18411a19b4
ntdll: Use wcscpy() instead of strcpyW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:53 +02:00
Alexandre Julliard
6fc9088789
ntdll: Avoid using memrchrW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 23:10:06 +02:00
Alexandre Julliard
7a974814cd
ntdll: Avoid using tolowerW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-30 23:10:06 +02:00
Alexandre Julliard
0d3ba59e13
ntdll: Use the ascii_to_unicode() helper to compare relay module names.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Alexandre Julliard
2f7cc584ce
ntdll: Use RtlCompareUnicodeStrings() instead of strncmpiW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Alexandre Julliard
4d93bafe96
ntdll: Use RtlEqualUnicodeString() instead of strcmpiW().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Alexandre Julliard
3e049b6b96
ntdll: Use wcsicmp() instead of strcmpiW() where possible.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Jacek Caban
1a05b7da63
ntdll: Support device paths in LdrGetDllPath.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48698
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:26:33 +01:00