Dmitry Timoshkov
a0772da5cf
ntdll: Don't try to map the PE file past the size of the backing file.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42125
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-15 11:42:22 +02:00
Alexandre Julliard
7e6a67d8c9
ntdll: Set up virtual memory layout in the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 23:12:31 +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
adb52247e3
ntdll: Fix __sync_bool_compare_and_swap() usage.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 20:59:36 +02:00
Alexandre Julliard
604e49056b
ntdll: Initialize server directory on macOS when sending Mach port.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 20:59:36 +02:00
Alex Henrie
474d1f0b2d
ntdll: Implement RtlIpv6StringToAddress(Ex)[AW].
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 20:59:36 +02:00
Brendan Shanks
b11afa1725
ntdll: Fix length calculation of generated SMBIOS tables.
...
An extra byte for a null-terminator was added for every string, but not
used when the string was empty. This resulted in extra bytes at the end
of the buffer, causing parse errors in dmidecode.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 11:40:25 +02:00
Alexandre Julliard
3214ca84d0
ntdll/tests: Add tests for RtlFormatMessage().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 20:22:26 +02:00
Alexandre Julliard
497358bbb9
ntdll/tests: Add some printf tests.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 14:43:27 +02:00
Alexandre Julliard
5bb9f86dbe
ntdll: Implement RtlFormatMessage().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 14:43:27 +02:00
Alexandre Julliard
b3a0a39356
ntdll: Merge new features from msvcrt's printf implementation.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 09:37:14 +02:00
Alexandre Julliard
f44e90d284
ntdll: Add a few printf functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 23:07:06 +02:00
Rémi Bernon
16e32e3b77
ntdll: Reduce USD section size to 0x1000.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 10:58:07 +02:00
Rémi Bernon
a1c46c3806
server: Add USD support with timestamp updates.
...
The USD page is created when the first process (wineboot.exe) completes
its creation, using its provided user_shared_data for initialization.
The server maps the page write-only and the clients map it read-only,
then the server updates the timestamps every 16 ms.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29168
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 10:57:56 +02:00
Rémi Bernon
dadf93f409
ntdll/tests: Add tests for USD memory basic info.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 10:57:54 +02:00
Rémi Bernon
89c242840d
ntdll/tests: Add tests for USD timestamp updates.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 10:48:38 +02:00
Alexandre Julliard
8045167117
ntdll/tests: Enable RtlDowncaseUnicodeString() test.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-11 21:24:58 +02:00
Zebediah Figura
e012bd5811
ntdll: Avoid leaking the previous environment in RtlSetCurrentEnvironment().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 11:30:11 +02:00
Zebediah Figura
d98b87a317
ntdll/tests: Add tests for RtlSetCurrentEnvironment().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 11:30:09 +02:00
Jacek Caban
93d1eecb6a
ntdll: Export _chkstk from importlib.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Alexandre Julliard
a10f1e9d7b
kernel32: Move FlushProcessWriteBuffers() stub to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Zebediah Figura
74f820fccc
ntdll: Export RtlCopyMemoryNonTemporal.
...
Needed by Blindwrite 7's kernel driver.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +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
Gijs Vermeulen
d8ec1fb894
ntdll: Remove unused function fast_wait_cv().
...
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-01 22:03:16 +02:00
Alexandre Julliard
2af035f53f
ntdll: Remove support for custom virtual memory alignments.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-30 12:37:27 +02:00
Alexandre Julliard
dee934c0ff
ntdll: Allocate TEBs out of a larger memory block.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-30 12:37:27 +02:00
Alexandre Julliard
5dcb9ddff7
ntdll: Get rid of obsolete KERN_THALTSTACK sysctl.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-30 12:37:27 +02:00
Alexandre Julliard
53b305c35e
ntdll: Use server_enter_uninterrupted_section() for LDT locking.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 19:53:57 +02:00
Alexandre Julliard
bd9a1e23f2
ntdll: Move TEB allocation to the common code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 14:03:26 +02:00
Alexandre Julliard
9650f1d3a1
ntdll: Move signal stack size computation to the common code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 13:34:06 +02:00
Alexandre Julliard
ffb7c595c6
ntdll: Add a helper for platform-specific threading initialization.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 13:17:07 +02:00
Alexandre Julliard
69f068bfb1
ntdll: Remove VFAT_IOCTL_READDIR_BOTH kernel bugs workarounds.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 12:33:11 +02:00
Alexandre Julliard
6b4de51027
ntdll: Don't use a custom alignment for large heap blocks.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 12:33:11 +02:00
Alexandre Julliard
f5f1737456
ntdll: Store the pending free list in the main process heap.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 12:33:11 +02:00
Alexandre Julliard
9fd2330a96
ntdll: Add a helper to exec wineloader.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:28:29 +02:00
Alexandre Julliard
68a425b19c
ntdll: Add a helper to exec wineserver.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:28:25 +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
Alexandre Julliard
9122bc1096
ntdll: Avoid using wine_get_user_name() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:34:45 +02:00
Alexandre Julliard
73211637c1
ntdll: Avoid using wine_get_server_dir() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:34:30 +02:00
Alexandre Julliard
e5030a4ac0
ntdll: Avoid using wine_get_config_dir() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:34:07 +02:00
Rémi Bernon
daa120309e
server: Make sure pids/tids are multiples of four.
...
Street Fighter V unpacker relies on it when validating other processes
for its anti-debug checks, it uses (PID&0xfffffffc)>>2 as an array index
and then checks back indexes against PIDs, and terminates early if some
PIDs do not match.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:01:44 +02:00
Rémi Bernon
8bb684c63e
ntdll/tests: Test that ptids are multiples of four.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:01:40 +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
Serge Gautherie
340bc136a7
ntdll: Reorder DECLSPEC_NORETURN on raise_status().
...
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 12:57:43 +02:00