Commit graph

777 commits

Author SHA1 Message Date
Martin Storsjö 9e9509f307 winebuild: Fix relay entry points in Thumb mode with binutils/ELF and LLVM/PE.
b1fe783ade fixed relay entry points
in Thumb mode when assembled with Clang/LLVM in ELF mode, but broke
them when assembled with binutils as (and PE mode with LLVM didn't
work either before or after).

When/where the thumb bit is applied on symbols varies a lot between
assemblers; this is a notoriously vague and undocumented area.

After a .thumb_func directive, binutils as considers the next
non-local symbol as a thumb symbol, to have the thumb bit set.
LLVM's built-in assembler considers the next symbol, local or not,
to be a thumb symbol. (Just noting for reference for possible
solutions, this particular difference didn't play a role so far.)

Secondly, in a symbol difference expression like this:

    .long symbol1 - symbol2

Binutils as ignores the potential thumb state for both symbols and
just calculates the raw distance. LLVM does include the thumb bit
in symbol1 but ignores it in symbol2.

Finally, for PE targets, the linker sets the thumb bit on all
absolute addresses pointing to the text section, regardless of any
.thumb_func directives at assembly time. (I.e., the
__wine_spec_relay_entry_points entry in .L__wine_spec_relay_descr
gets the bit set even if it wasn't marked as .thumb_func.)

Therefore, mark __wine_spec_relay_entry_points as .thumb_func, as
the absolute address to it will end up with the thumb bit set in
PE builds in any case.

Don't mark the individual relay entry pointers as thumb functions
(the code still is generated as thumb as there hasn't been any
mode switch back to arm mode); this makes the differences calculated
correctly (both LLVM and binutils ignore the thumb state of the
subtracted label).

If desired, one could change __wine_spec_relay_entry_point_%d into
local labels with a .L prefix, just as before
b1fe783ade again, it doesn't make
any difference in this form.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-05 11:58:42 +01:00
Alexandre Julliard 5a8f7d1f74 winebuild: Wrap 16-bit fake dlls in a PE module.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51564
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-21 14:53:32 +02:00
Alexandre Julliard 2f0401c783 winebuild: Add a more generic way to create directories and sections in fake dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-21 14:03:54 +02:00
Alexandre Julliard f9ee0d2f05 tools: Avoid using wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02:00
Alexandre Julliard 3eb1855c7e winebuild: Avoid using getopt_long().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 11:53:08 +02:00
Zebediah Figura ea66623c3c winebuild: Move the CALL32_CBClient[Ex]_RetAddr implementation to krnl386.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-04 11:00:23 +02:00
Zebediah Figura 1f3eb3996d winebuild: Move the CALL32_CBClient[Ex] implementation to krnl386.
Except for the return thunk.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-04 10:59:35 +02:00
Alexandre Julliard 9e3959bd9b tools: Add a few helper functions for file names and extensions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:11 +02:00
Alexandre Julliard 55701c6672 tools: Add a helper function to create temp files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:11 +02:00
Alexandre Julliard 2a08d6ce80 tools: Add helper functions to spawn a command from an strarray.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 18:18:49 +02:00
Alexandre Julliard 97ca9f8a3d tools: Add a shared header for common helper functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 17:38:06 +02:00
Alexandre Julliard c878a0a4c0 winebuild: Use strarrays for the argument lists.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 14:45:39 +02:00
Alexandre Julliard d6d5a21721 winebuild: Unify the strarray implementation with the one from makedep.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 14:45:39 +02:00
Alexandre Julliard ea6308e364 ntdll: Declare the syscall functions array explicitly.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard 7ae1c396ac ntdll: Store the syscall argument table on the PE side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard 3513a176fd winebuild: Add an option to set the syscall table id.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard ff04d8a4c2 ntdll: Move the syscall dispatcher implementation to the platform-specific files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 11:25:38 +02:00
Alexandre Julliard 847db3c1d3 ntdll: Store the syscall table in the syscall frame on all platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 10:47:38 +02:00
Alexandre Julliard 77f5e2963f ntdll: Store the syscall flags in the syscall frame on all platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 10:47:38 +02:00
Alexandre Julliard 8ee30e6dcc winebuild: Fix 64-bit argument alignment on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 15:15:10 +02:00
Alexandre Julliard 94f63ea23f ntdll: Add support for user callbacks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 18:16:43 +02:00
Martin Storsjö 5de4766475 winebuild: Fix building for arm with older versions of binutils.
Use an explicit "movw" instead of a plain "mov", as the immediates
might not fit in a narrow thumb mov instruction. Newer versions
of binutils deduces this implicitly.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Martin Storsjo 9d619b1fb0 winebuild: Spell out "x30" instead of "lr" for arm64.
This fixes building with older binutils versions.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-02 11:31:48 +02:00
Alexandre Julliard 216d241178 winebuild: Save/restore the %fs register in the syscall dispatcher on Linux.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 15:50:26 +02:00
Alexandre Julliard 5e12256ec4 winebuild: Add a specific platform id for Linux.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-06 15:50:26 +02:00
Alexandre Julliard db26df5934 ntdll: Go through the syscall return path for syscall faults.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 18:35:20 +02:00
Alexandre Julliard 0702d6b886 ntdll: Don't allow single-stepping through syscalls.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51273
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 15:05:24 +02:00
Alexandre Julliard 7954b86f6b ntdll: Switch to the kernel stack for syscalls on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard 08c4419a49 ntdll: Switch to the kernel stack for syscalls on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard 25b093f384 ntdll: Switch to the kernel stack for syscalls on x86-64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 18:45:44 +02:00
Alexandre Julliard 308a5e7c4d ntdll: Switch to the kernel stack for syscalls on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 15:49:29 +02:00
Alexandre Julliard 050378d4d7 ntdll: Only restore the modified parts of the syscall frame on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 17:16:21 +02:00
Alexandre Julliard 32f1bfd0f0 ntdll: Only restore the modified parts of the syscall frame on x86-64.
Based on a patch by Jacek Caban.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 17:16:21 +02:00
Zebediah Figura bbe2eaecc9 winebuild: Fix a typo in a comment.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-03 21:50:58 +02:00
Alexandre Julliard 42e42e9085 ntdll: Use a single syscall dispatcher controlled by global flags on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:07 +02:00
Alexandre Julliard 3d9cb5e4f8 ntdll: Use a single syscall dispatcher controlled by global flags on x86-64.
Based on a patch by Jacek Caban.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:07 +02:00
Alexandre Julliard e79fa1866c winebuild: Add support for multiple syscall descriptor tables.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-28 21:53:07 +02:00
Alexandre Julliard 543e49397f winebuild: Store all parameters on the stack for syscall thunks on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:13:18 +02:00
Jacek Caban ea239f6b12 winebuild: Use clang -print-prog-name to find LLVM tools.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-10 18:14:07 +02:00
Jacek Caban e979ee96b6 ntdll: Use xsave compaction in syscall dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Jacek Caban af74bd3122 ntdll: Use syscall dispatcher to restore context in NtSetContextThread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:39 +01:00
Jacek Caban 5d228d6fc9 ntdll: Store x86 YMM context insyscall dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:40:49 +01:00
Jacek Caban ce5f17c892 ntdll: Store FPU and XMM contexts in x86 syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban e341d1f695 ntdll: Restore all non-volatile i386 registers in syscall dispatcher.
Based on set_full_cpu_context.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban b04f2689a2 ntdll: Store all non-volatile i386 registers in syscall dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:44:18 +01:00
Jacek Caban c6d303ca23 ntdll: Reserve space for full i386 context in syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:43:19 +01:00
Alexandre Julliard abf4747ba7 winebuild: Simplify constant loading on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Alexandre Julliard b1fe783ade winebuild: Fix relay entry points for Thumb mode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Alexandre Julliard 4ef8e946f1 winebuild: Set Thumb bit in CPSR register on syscall entry.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban a8856381ed ntdll: Use xsavec in x86_64 syscall dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:17 +01:00
Jacek Caban 437bef6ac1 ntdll: Use syscall dispatcher for restoring context in x86_64 NtSetContextThread implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:15 +01:00
Jacek Caban 11e3d43c26 ntdll: Store x86_64 YMM context in syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Jacek Caban a06d60bd5f winebuild: Factor out output_syscall_dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Alexandre Julliard ad43872669 winebuild: Add a --prefer-native option to set a Wine-specific flag in the PE header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 11:06:06 +01:00
Jacek Caban be8729c9f5 winebuild: Restore x86_64 FPU context and nonvolatile registers in syscall dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:47:28 +01:00
Jacek Caban 9b6f715b28 winebuild: Restore all x86_64 control registers in syscall dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:46:37 +01:00
Jacek Caban f72940de8e ntdll: Store segment registers in x86_64 syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:51 +01:00
Jacek Caban 4e5b61bb06 ntdll: Store stack pointer in x86_64 syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:34 +01:00
Jacek Caban accf7a0908 ntdll: Store instruction pointer register in x86_64 syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:29 +01:00
Jacek Caban 9bdd02de0c ntdll: Store eflags in x86_64 syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:14 +01:00
Jacek Caban 6d2f08cfcb ntdll: Reserve space for all registers in x86_64 syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 15:45:11 +01:00
Jacek Caban 877f06d123 winebuild: Remove no longer needed stack alignment in x86_64 syscall dispatcher.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 12:00:04 +01:00
Jacek Caban 8f50dde9cd ntdll: Store entire XMM context in x86_64 syscall frame.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-17 11:59:40 +01:00
Jacek Caban 6d9b331184 winebuild: Don't use llvm-lib to build static libs containing importlibs.
It's not supported by LLVM 10.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50653
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-12 16:10:53 +01:00
Jacek Caban 8c2ad8e403 winebuild: Use lld-link for static libraries on msvc target.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 10:11:15 +01:00
Jacek Caban ea5e89a545 winebuild: Make mingw a separated platform from msvc.
Based on winegcc.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 09:02:04 +01:00
Alexandre Julliard fc7c3b51ac ntdll: Always inline NtCurrentTeb() on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Alexandre Julliard 7c48d8d44b winebuild: Support non-PIC mode for ARM targets.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 09:42:30 +01:00
Alexandre Julliard c1a700f018 winebuild: Generate Thumb2-compatible assembly code on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 09:42:26 +01:00
Alexandre Julliard 90ac46fe33 winebuild: Simplify ARM64 import thunks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 13:02:09 +01:00
Martin Storsjo dc46af7245 winebuild: Pass -m options to dlltool for arm and arm64.
This allows using the arch independent llvm-dlltool without the
llvm-mingw specific <triple>-dlltool wrappers.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 11:56:44 +01:00
Martin Storsjo e9fa452ba3 asm: Separate .def/.scl/.type/.endef with newlines instead of semicolons.
When targeting arm64 in MSVC mode, LLVM treats semicolons in assembly
as comment char, instead of as statement separator (contrary to in
mingw mode, where semicolons still work as separator). In generated code,
there's no need to keep these directives on one single line though, so
just separate them with newlines.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-21 11:56:29 +01:00
Kevin Puetz 48cccee394 winebuild: Find WinMain/wWinMain in static libraries.
Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 22:18:21 +01:00
Kevin Puetz bf5893f489 winebuild: Find main/wmain in static libraries.
Have the winebuild -spec.o include an undefined .globl referencing
symbols we know the winecrt0 entry point will eventually reference,
so ld knows about that need while scanning library archives.

Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 22:18:21 +01:00
Kevin Puetz a1078d4770 winebuild: Select all __wine_spec_exe* entry inside winebuild.
Override --entry in winegcc only when it applies to any compiler
(e.g. kernel drivers or msvcrt) but leave spec details to winebuild.

Forward -municode so winebuild will know which to use.

Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 22:18:20 +01:00
Alexandre Julliard b3a38fef26 winebuild: Initialize entry point to avoid a compiler warning.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Alexandre Julliard b636f9816f krnl386: Move the 16-bit stack out of the WOW32Reserved field.
Based on a patch by Sebastian Lackner.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Alexandre Julliard 043489456c ntdll: Make x86_64 syscall thunks position independent.
Based on a patch by Paul Gofman.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:19 +01:00
Alexandre Julliard d5c089f5fa winebuild: Set PE timestamps to a hash of the file name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44061
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-29 22:23:08 +01:00
Alexandre Julliard 3eaf036b10 winebuild: Add __imp_ label on the import data for delayed imports.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-14 21:33:17 +02:00
Martin Storsjo 559d502699 winebuild: Add unwind info to arm64 syscall stubs.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-29 12:02:46 +02:00
Alexandre Julliard 75e616d52b ntdll: Clear the syscall frame on return instead of popping the previous one.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 12:14:35 +02:00
Alexandre Julliard 0e7f6e0ed3 winebuild: Allow syscalls to use the cdecl convention.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:51:37 +02:00
Martin Storsjo 849d08b0ae winebuild: Use the right arm64 page/pageoff relocation syntax for darwin.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:32:25 +02:00
Alexandre Julliard cff04b34ac winebuild: Always use DllMain as entry point for the 32-bit side of a 16-bit module.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49559
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 12:06:08 +02:00
Alexandre Julliard 15b3584603 winebuild: Store the syscall frame in the thread data on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 13:35:30 +02:00
Alexandre Julliard 28e443d9e2 winebuild: Store the syscall frame in the thread data on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 13:31:59 +02:00
Alexandre Julliard 9a7c56d9e7 winebuild: Store the syscall frame in the thread data on x86_64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 13:10:28 +02:00
Alexandre Julliard 8e3b5183cc winebuild: Store the syscall frame in the thread data on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 13:00:50 +02:00
Paul Gofman e9b3660e72 ntdll: Always align stack pointer in __wine_syscall_dispatcher on x64.
Syscall thunks break stack alignment for dispatcher. Regardless of that,
it is probably better not to assume aligned stack in syscall thunk entry.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-14 22:31:27 +02:00
Jacek Caban 7e4ea871a3 winebuild: Use asm_name for __wine_syscall.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 17:41:09 +02:00
Alexandre Julliard 461fc592ad winebuild: Fix retrieving syscall arg length on x86_64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-09 13:04:05 +02:00
Alexandre Julliard 917a206b01 winebuild: Generate Windows-style syscall thunks on x86_64.
Based on patches by Michael Müller.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 14:38:23 +02:00
Alexandre Julliard 20715ee3fd winebuild: Generate Windows-style syscall thunks on x86.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 14:38:20 +02:00
Zebediah Figura d33474fa6b winebuild: Fix a spelling error in a comment.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-08 07:49:33 +02:00
Alexandre Julliard b2d09cbb21 winebuild: Add generation of system call thunks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 13:07:23 +02:00
Alexandre Julliard a0266339c7 winebuild: Add a -syscall entry point flag
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 13:07:23 +02:00
Alexandre Julliard 66fb3802d3 winebuild: Allow specifying a spec file also for Unix libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-06 16:17:24 +02:00
Alexandre Julliard e6632e0412 winebuild: Don't use a dll entry point for Unix libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:59:35 +02:00
Alexandre Julliard 7933562048 winebuild: Support a -mno-cygwin flag.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:59:35 +02:00