Commit Graph

133 Commits

Author SHA1 Message Date
Alexandre Julliard e3001b6a7c configure: Assume that sys/mman.h is available on Unix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard 4f58d8144c ntdll: Remove __wine_init_unix_lib() and the old Unix library interface.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 17:14:59 +01:00
Paul Gofman d2e35b04fb ntdll: Remove a special case for entry point not in executable section in map_image_into_view().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Alexandre Julliard 456e76185d ntdll: Don't return a default Unix handle for modules that don't have a Unix library.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 16:19:48 +01:00
Alexandre Julliard 7d2a7b94aa ntdll: Fix handling of zero size with MEM_DECOMMIT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52023
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-19 11:17:24 +01:00
Paul Gofman 1722615b06 ntdll: Don't constraint TEB address to 2GB for native x64 process.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-04 22:36:28 +01:00
Damjan Jovanovic fbb633750f ntdll: Populate MEMORY_WORKING_SET_EX_INFORMATION on FreeBSD.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:06:48 +01:00
Alexandre Julliard 832724282b ntdll: Avoid including wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 16:16:07 +02:00
Huw Davies 5689ec7bba ntdll: Return a failure if the unix call funcs don't exist.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-08 16:55:20 +02:00
Jacek Caban 2ec2e136bf ntdll: Allow Unix libraries to use exception macros.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Paul Gofman bcdb28a563 ntdll: Optimize get_vprot_range_size() for big ranges.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 21:59:15 +02:00
Paul Gofman 1f28e92e7c ntdll: Scan pages only once in get_basic_memory_info().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 21:55:01 +02:00
Paul Gofman b7fafabc77 ntdll: Factor out get_vprot_range_size() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 21:51:22 +02:00
Alexandre Julliard e9cfc97d46 Revert "ntdll: Add a Wine-specific class in NtQueryVirtualMemory to retrieve the init functions of a module."
This reverts commits e5339ecbc6 and
18408b18f3.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51596
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 20:22:11 +02:00
Alexandre Julliard faaad36429 ntdll: Make get_builtin_unix_funcs() static.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-13 11:38:25 +02:00
Gerald Pfeifer 59da79021a ntdll: Only use sysinfo function when present.
On some systems <sys/sysinfo.h> may be present while the sysinfo
function may not, or at least not as part of standard libraries,
so check whether the function is actually available before using
it.

This fixes builds on FreeBSD with the devel/libsysinfo present.

Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 23:00:50 +02:00
Alexandre Julliard 2941e51855 ntdll: Avoid CDECL on internal functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 23:00:50 +02:00
Alexandre Julliard 572817948a ntdll: Add a custom type for the Unix functions table handle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 18:07:32 +02:00
Alexandre Julliard d91d05b80a ntdll: Add a Wine-specific NtQueryVirtualMemory() query to retrieve the Unix call table.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 18:06:50 +02:00
Alexandre Julliard c29f650474 ntdll: Load the Unix dll at the same time as the PE one, but don't map it yet.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Alexandre Julliard 18408b18f3 ntdll: Make release_builtin_module() static.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Alexandre Julliard e5339ecbc6 ntdll: Add a Wine-specific class in NtQueryVirtualMemory to retrieve the init functions of a module.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Alexandre Julliard c6373abc10 ntdll: Update the MEMORY_INFORMATION_CLASS enumeration.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Alexandre Julliard 669d1cce03 ntdll: Add a magic parameter to NtFreeVirtualMemory() for releasing address space.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Alexandre Julliard b08b4b8213 server: Store the entry point as image-relative in pe_image_info_t.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51539
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-30 12:14:30 +02:00
Alexandre Julliard 37705d9ff6 ntdll: Don't restore %fs selector on nested signals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-09 21:08:46 +02:00
Alexandre Julliard 0426430563 ntdll: Implement NtWow64GetNativeSystemInformation().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 13:41:30 +02:00
Alexandre Julliard 5071a28743 ntdll: Implement SystemEmulation* information classes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 13:41:27 +02:00
Alexandre Julliard 8794879335 ntdll: Clear the 32-bit TLS for ZeroTlsCell in Wow64 mode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 10:32:24 +02:00
Roman Pišl 0ec555e58e ntdll: Don't pretend that the whole address space is reserved on non-i386.
This is analogous to 61dcca5dbf.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50735
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-30 20:01:20 +02:00
Alexandre Julliard 19f19d0e2e ntdll: Implement NtWow64AllocateVirtualMemory64().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 14:51:25 +02:00
Alexandre Julliard bfd2d1d77d ntdll: Implement NtWow64Read/WriteVirtualMemory64().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-29 12:42:57 +02:00
Alexandre Julliard de89ce1bfe ntdll: Support growing both 32- and 64-bit stacks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:01:38 +02:00
Alexandre Julliard e91d19a58a ntdll: Remove special case for setting permissions on stack pages.
We are running on the kernel stack at this point.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:01:38 +02:00
Alexandre Julliard 7b4ca95ab6 ntdll: Add a helper to get the Wow64 TEB.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:01:37 +02:00
Alexandre Julliard 588d91aecf ntdll: Store the current PEB in a global variable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Alexandre Julliard 6b277dc89d ntdll: Always allocate extra stack space for the kernel stack.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 11:06:42 +02:00
Alexandre Julliard 1cc0649755 ntdll: Store exception jump buffer in the per-thread data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 15:16:23 +02:00
Zebediah Figura ac3ec2d955 ntdll: No longer export __wine_locked_recvmsg().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 11:34:36 +02:00
Alexandre Julliard 78cbc26957 ntdll: Fill the Wow64 PEB and process parameters.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard d389da0953 ntdll: Store debug options in the PEB memory block.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 21:37:49 +02:00
Alexandre Julliard e40eab977a ntdll: Only check the is_wow64 flag on 32-bit platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard a8ff0c12f4 ntdll: Allocate a separate 64-bit stack for Wow64 threads.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard 5864bc88de ntdll: Always send the native PEB pointer to the server.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard 4dca2cc797 ntdll: Always send the native TEB pointer to the server.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard 6f9562db20 ntdll: Only compute the zero_bits mask when needed.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard 6de7fa1bde ntdll: Take the zero_bits parameter into account in NtCreateThreadEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard 8b79c8d41f ntdll: Use the native machine id instead of hardcoded values.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 20:42:29 +02:00
Alexandre Julliard 616415a6df ntdll: Store the debug info for the initial thread next to the PEB.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00
Alexandre Julliard 789c1db18a ntdll: Allocate TEBs and stacks in the low 2G.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00