Commit graph

777 commits

Author SHA1 Message Date
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
Paul Gofman 19aa67d170 winebuild: Correct hotpatching prologue in import thunks for x86_64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48938
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-26 20:58:50 +02:00
Alexandre Julliard cee48cc789 winebuild: Make the 32-bit side of a 16-bit module always a DLL.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-19 15:14:12 +02:00
Jacek Caban e4e05cdaab winebuild: Introduce --safeseh option that allows marking assembly files as SEH compatible.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-06 19:02:55 +02:00
Alexandre Julliard 7193243431 winebuild: Don't use a constructor for dll modules either.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 11:27:33 +02:00
Alexandre Julliard 6c4046fef1 winebuild: Add --fixup-ctors option to allow intercepting constructors in .so files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard 593c38cb95 winebuild: Set page size to 4096 also on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard a4677fa23a winebuild: Only generate a constructor for dll modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 20:03:30 +02:00
Alexandre Julliard 2746797ad5 winebuild: Support building krnl386.exe in PE format.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 10:55:25 +02:00
Jacek Caban c0467a1470 winebuild: Add an option to build a static library.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 22:43:41 +01:00
Jacek Caban d473611469 winebuild: Also try llvm variants of tools in find_tool.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-04 22:43:27 +01:00
Jacek Caban d24503fecf winebuild: Check more target components for platform string.
Fixes parsing llvm style mingw target *-pc-windows-gnu.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Alexandre Julliard 9dc348a071 winebuild: Add a --builtin option to mark PE files as builtins.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-18 21:13:13 +01:00
Jacek Caban 4346d68e1b makedep: Use -Wl,-delayload option for winebuild delayimports.
Also fixes winebuild to correctly handle module extensions.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 21:39:40 +01:00
Alexandre Julliard 6306a1730a winebuild: Add support for excluding a specific CPU architecture.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-16 14:38:13 +02:00
Alexandre Julliard 6ba101b229 winebuild: Add support for the -B option.
Based on a patch by Kevin Puetz.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-10 23:20:41 +02:00
Alexandre Julliard 0fd3b1eab9 Revert "winebuild: Quote stdcall decored symbols."
This reverts commit a3e1fe936e.
It breaks with older binutils.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-27 10:41:20 +02:00
Jacek Caban a3e1fe936e winebuild: Quote stdcall decored symbols.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-26 17:41:15 +02:00
Jacek Caban e574d4f8f9 winebuild: Don't underscore local symbols in func_declaration.
This is the case in output_call16_function. GNU ld happens to handle it,
but LLD does not.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-26 17:41:15 +02:00
Jacek Caban dd1a83c20a winebuild: Don't include aliases in importlib .def files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-26 17:41:11 +02:00
Alexandre Julliard 907896fba5 winebuild: Set the default entry point also for Windows builds.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47410
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 17:44:03 +02:00
Alexandre Julliard cf619dd419 winebuild: Add -import entry point flag to generate hotpatchable import thunks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-21 22:51:55 +02:00
Michael Stefaniuc dd0e2616a7 winebuild: Use the now available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 20:41:26 +02:00
Alexandre Julliard 450f0fa696 winebuild: Don't import standard C functions in Unix mode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 09:24:45 +02:00
Alexandre Julliard 5061261c5e winebuild: Add a -munix option.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 09:24:25 +02:00
Alexandre Julliard ded2e82f16 winebuild: Don't even try to resolve imports for PE builds.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-04 19:23:11 +02:00
Alexandre Julliard d58953b300 winebuild: Add 16-bit support for PE builds.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 10:15:17 +02:00
Alexandre Julliard 1f6681f474 winebuild: Use cdecl calling convention for stub exceptions.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47226
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 10:15:17 +02:00
Alexandre Julliard 7b494f13e7 winebuild: Store wine_ldt_copy pointer in the NE header at load time.
Avoids having to import libwine from 16-bit modules.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:01:01 +02:00
Alexandre Julliard 075e561f5c winebuild: Don't change %fs and %gs when calling 16-bit register functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:00:59 +02:00
Alexandre Julliard 945efdb6f3 makefiles: Use -fshort-wchar when building with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 22:55:54 +02:00
Alexandre Julliard 6c41cc6152 winebuild: Support relay debugging for PE builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 22:55:50 +02:00
Alexandre Julliard 0a79eb3608 include: Use the __thiscall attribute directly for the Mingw build.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 19:00:10 +02:00
Alexandre Julliard e755ea2374 winebuild: Support Windows-style name mangling for fastcall functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 14:07:15 +02:00
Alexandre Julliard 92233bfaf5 makefiles: Support delay imports for PE builds.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:35 +02:00
Martin Storsjo f098cd6d3a winebuild: Print the nm command in verbose mode.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 17:29:11 +02:00
Alexandre Julliard 015f31fd5d winebuild: Avoid using mmap().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 10:43:57 +02:00
Alexandre Julliard 32b365c9c5 winebuild: List stubs in the import library .def files.
This way we have the full list of names to compute ordinal hints.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-20 12:33:14 +01:00
Alexandre Julliard 074ec5844b winebuild: Set the import hint based on the name index.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-20 11:49:38 +01:00
Alexandre Julliard 265366c1e7 winebuild: Use proper RVAs for the export table on Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-19 10:05:24 +01:00
Huw Davies b2585d98b2 winebuild: Use the correct section label on macOS.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-13 10:59:13 +01:00
Alexandre Julliard e4b9a501a3 winebuild: Support generating a .spec.o file for Windows platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 10:02:04 +01:00
Alexandre Julliard b9c5bac673 winebuild: Specify the correct linker emulation for Windows platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:19 +01:00
Alexandre Julliard 4f266a88c0 winebuild: Don't use underscore prefix on 64-bit Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:19 +01:00
Alexandre Julliard 7d41cde73f winebuild: Add a helper for generating data directories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:19 +01:00
Alexandre Julliard 7555fd57e3 winebuild: Add a helper for generating RVA pointers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:19 +01:00
Alexandre Julliard ef9bda4c96 winebuild: Add a helper for decorating stdcall function names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:19 +01:00
Alexandre Julliard a3229faf59 winebuild: Output the module filename along with the stub data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:19 +01:00
Alexandre Julliard 0cdab409ad winebuild: Rename BuildSpec32File() for consistency.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:17 +01:00
Alexandre Julliard 67f6c6c0c9 winebuild: Add a helper function to open a temporary file as output.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 14:49:02 +01:00
Alexandre Julliard aa0572f0a2 winebuild: Open the output file only when needed.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 14:49:02 +01:00
Alexandre Julliard 9d0ba368da winebuild: Make relay entry points hot-patchable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Alexandre Julliard 26bbbb7b73 winebuild: Use stdcall for fastcall wrappers.
This allows catching mismatched argument lists.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Alexandre Julliard 84a7a7ea07 winebuild: Add support for fastcall entry points.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 23:01:29 +01:00
Alexandre Julliard 28debd82fc winebuild: Make thiscall an entry point flag instead of a function type.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 23:00:56 +01:00
Piotr Caban 8b24bc95b9 winebuild: Recognize armv7a target.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 18:22:21 +01:00
Alexandre Julliard 39698f5468 winebuild: Align resource data to dword boundaries even on 64-bit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-18 22:55:34 +01:00
James Larrowe f97636bc49 winebuild: Fix a segmentation fault.
When 'winebuild' is called with no arguments, the make_c_identifier
function is passed a null pointer, which is dereferenced and causes
a segmentation fault.

Signed-off-by: James Larrowe <larrowe.semaj11@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-14 17:25:49 +01:00
Alexandre Julliard 0fd533836b winebuild: Pass the -mfpu option to the compiler/assembler.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 20:20:25 +01:00
Huw Davies 13fec030e7 winebuild: On x86_64, save xmm0 - 3 during the delayed import lookup.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 19:38:30 +01:00
Alexandre Julliard 96c77a8cf6 winebuild: Stop building the DPMI event check routine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 17:16:13 +01:00
Alexandre Julliard 5e3534ee41 ntdll: Fix handling of floating point arguments in relay debugging on ARM.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 13:50:55 +01:00
Alexandre Julliard 0c42b33a0b winebuild: Add support for -mfloat-abi option.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-08 16:45:55 +01:00
Alexandre Julliard 8c1bb2aa61 ntdll: Display floating point arguments in relay debugging on i386 and x86-64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-07 11:14:02 +01:00
Austin English b54cf05714 winebuild: Move WineHQ URLs to https.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-01 09:29:41 +01:00
Alexandre Julliard 75a830e8e1 winebuild: Put the thunk hint/name in FirstThunk too instead of zero.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 15:35:20 +02:00
André Hentschel db848fa767 winebuild: Improved position independent code generation.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:02:33 +09:00
Alexandre Julliard e3a236e6ce winebuild: Remove 32-bit register function support.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:43:09 +02:00
Alexandre Julliard 9fd4647977 winebuild: Disallow register functions in 32-bit modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:43:01 +02:00
Alexandre Julliard 9e59362ae3 ntdll: Move the plaform-specific thread data to the SystemReserved2 TEB field.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:30 +02:00
André Hentschel eed3bb6dfd winebuild: Emit relay debugging thunks for ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-13 20:56:20 +02:00
Zebediah Figura 544ea174a6 winebuild: Use unsigned int in spec file variable parameters.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-02 20:40:14 +01:00
Francois Gouget 44468e8536 tools: Assorted comment spelling fixes.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 14:57:30 +09:00
Alexandre Julliard c52e4b6551 winebuild: Mark the stack non-executable in static import libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-05 00:06:41 +09:00
Alexandre Julliard 13fe69714b winebuild: Add support for linking to static import libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 15:35:18 +09:00
Alexandre Julliard aac69889bf winebuild: Add support for creating static import libraries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-25 15:35:17 +09:00
Alexandre Julliard 59b5c52f1d winebuild: Add a common helper to find an imported dll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-23 22:55:46 +09:00
Alexandre Julliard ebb9c5e246 winebuild: Use a global flag to determine when to generate the get_pc thunk.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 18:12:28 +09:00
Alexandre Julliard 77a13f69b4 winebuild: Add a separate structure to store the data of imported functions.
We only need the name and ordinal.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 16:34:35 +09:00
Alexandre Julliard 68614d5db2 winebuild: Store delayed imports in a separate list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 16:16:58 +09:00
Alexandre Julliard 9b70b6bd13 winebuild: Store dll imports in a list instead of an array.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 16:15:01 +09:00
Alexandre Julliard 05399ad711 winebuild: Store a C-compatible version of the dll name.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 15:20:38 +09:00
Alexandre Julliard 8e10ae6705 winebuild: Don't store the full spec for an imported dll.
We only need the dll name.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 15:16:59 +09:00
Alexandre Julliard d65446af3d winebuild: Use strarray objects for a few more string arrays.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-21 15:26:24 +09:00
Alexandre Julliard 8baaf5349f winebuild: Use strarray objects instead of pointers where possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-19 13:14:41 +09:00
Charles Davis 77960ab755 winebuild: Specify an object format to windres.
Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:10 +09:00
Charles Davis 2ea17846b8 winebuild: When building implibs, invoke dlltool with a machine type.
Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-11 20:26:10 +09:00
André Hentschel bd545cb069 winebuild: Detect armv* toolchains.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-30 08:08:43 +01:00
Stephen Kitt 33c729bb1b winebuild: Add support for -march.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-15 09:11:33 +01:00
Alexandre Julliard da340169d6 makefiles: Generate rules for installing programs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-29 21:20:06 +09:00
Alexandre Julliard 7626728b56 makefiles: Generate rules for building tool binaries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-27 14:47:27 +09:00
Alexandre Julliard 8935863f55 winebuild: Add DllMain to the list of functions that should be private. 2015-07-15 15:59:46 +09:00
André Hentschel d1f9067cf5 winebuild: Create stubs for ARM64. 2015-06-15 15:29:03 +09:00
Michael Müller 6b4ac9971a winebuild: Set a valid major and minor linker version.
Some apps expect a nonzero linker version.
2015-06-10 16:16:29 +09:00
Nikolay Sivov 233c8c163b winebuild: Remove always false condition (Coverity). 2015-06-03 22:52:06 +09:00
André Hentschel d33f382b29 winebuild: Use a 64k page size on ARM64. 2015-05-12 17:33:14 +09:00
Qian Hong 604c4dba80 ntdll: Correctly document the offset of ntdll_thread_data.
This is a follow up of 16ddc62405.
2015-04-21 14:30:45 +09:00
Alexandre Julliard 1097384377 winebuild: Avoid assigning values outside of the target_cpu enum range. 2015-03-04 21:50:29 +09:00
Sebastian Lackner 4c8b3f63be winebuild: Conditionally use different code for restoring the context structure.
Fixes a regression introduced by 44fbc018ed.
2015-03-03 18:12:30 +09:00
Sebastian Lackner 44fbc018ed winebuild: Do not access memory below ESP when restoring thread contexts.
Based on a patch by John Reiser.
2015-02-27 15:05:54 +09:00
Charles Davis 6f6e42498d winebuild: Make emitting mod_*_func sections on Mac OS respect the pointer size. 2015-01-23 11:08:38 +01:00