1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00
Commit Graph

777 Commits

Author SHA1 Message Date
Alexandre Julliard
bc2e4ea7e2 winebuild: Update target-dependent characteristics after option parsing. 2023-06-09 23:37:14 +02:00
Alexandre Julliard
320acdad05 winebuild: Set a 64-bit base address for generated 64-bit dlls. 2023-06-09 23:37:14 +02:00
Zebediah Figura
6bcfab4ca6 winebuild: Use the lretw mnemonic in wine_call_to_16().
We already use it in the __wine_spec_callfrom16_* functions.
2023-06-02 09:32:23 +02:00
Zebediah Figura
63a6f01a70 winebuild: Use segment prefixes in 16-bit stack switching code instead of writing out byte values.
Presumably at one point there were assemblers that choked on
these. However, currently we use segment prefixes elsewhere in
wine (namely, in the syscall dispatcher), and it seems fair to assume
that a sane compiler should support them.
2023-06-02 09:32:23 +02:00
Alexandre Julliard
fddd7aab7c winebuild: Disallow floating point arguments in syscall functions. 2023-05-12 11:39:10 +02:00
Alexandre Julliard
921367fc57 winebuild: Only allow the stdcall calling convention for system calls. 2023-02-27 11:02:14 +01:00
Rémi Bernon
0b3f90ab14 winebuild: Use .incbin instead of printf for resource data. 2023-02-13 17:03:02 +01:00
Alexandre Julliard
8772b38494 tools: Make sure that config.h is included. 2023-01-30 09:31:32 +01:00
Huw Davies
38a7145731 winebuild: Reorder the includes to avoid a build error on macOS.
"build.h" eventually includes <sys/queue.h> which contains a conflicting
definition of LIST_INIT.
2023-01-26 22:05:13 +01:00
Alexandre Julliard
ae8797c8e3 tools: Add a common helper to setup signal handlers. 2023-01-25 11:47:51 +01:00
Alexandre Julliard
ca398e2762 tools: Add a common helper to cleanup temp files. 2023-01-25 11:47:51 +01:00
Fan WenJie
7f62f7be87 winebuild: Only set thumb_mode on ARM targets.
Signed-off-by: Fan WenJie <fanwj@mail.ustc.edu.cn>
2023-01-20 15:59:09 +01:00
Alexandre Julliard
bdc40b4b60 tools: Create a temporary directory to store temp files. 2023-01-12 14:47:39 +01:00
Alexandre Julliard
cb86bb92d2 winebuild: Disable relay for non-standard fastcall parameters. 2022-12-16 17:08:10 +01:00
Alexandre Julliard
df31d3c7fe winebuild: Use new ELF tag ids also on 64-bit.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53912
2022-12-16 10:42:01 +01:00
Alexandre Julliard
1f5c288b4f winebuild: Put the delay import thunk in a separate section.
To work around a binutils bug, cf. https://sourceware.org/bugzilla/show_bug.cgi?id=14339
2022-12-07 10:05:49 +01:00
Alexandre Julliard
4b59142f34 winebuild: Avoid quoting section names.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54060
2022-12-07 10:05:07 +01:00
Alexandre Julliard
bef0969722 ntdll: Move the .so module initialization to winecrt0.
Use new ELF tag ids to avoid breaking backwards compatibility.
2022-12-04 22:00:43 +01:00
Alexandre Julliard
c20741b33a winebuild: Reinstate the __wine_spec_dll_entry() entrypoint for .so dlls. 2022-12-03 16:24:45 +01:00
Alexandre Julliard
de3c286adf winebuild: Call __delayLoadHelper2 to resolve delay imports also on non-PE builds. 2022-11-29 19:11:19 +01:00
Alexandre Julliard
1181011c1e winebuild: Pass the delay import descriptor to the __wine_spec_delay_load function. 2022-11-29 19:11:19 +01:00
Alexandre Julliard
a2d8e7a5d3 winebuild: Generate a separate helper for each delay-imported module. 2022-11-29 19:11:19 +01:00
Alexandre Julliard
0c39285077 winebuild: Use RVAs instead of absolute addresses in the delay import descriptors.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-11-29 19:11:19 +01:00
Alexandre Julliard
29060f3d78 winebuild: Add a helper function to output a thunk data pointer. 2022-11-29 19:11:19 +01:00
Alexandre Julliard
ac17191530 winebuild: Remove support for "hybrid" Unix libraries. 2022-11-11 12:07:41 +01:00
Rémi Bernon
2e5e5ade82 winebuild: Put the delay import descriptor in data section.
This fixes incorrect .text section flags for any module using delay
imports. The use of a custom .text$2 section as dlltool is doing causes
the section to be flagged as DATA, and ends up with the .text section
being writable, which triggers the anti tamper used in Forza Horizon.
2022-11-08 20:07:52 +01:00
Rémi Bernon
cfe83e80fc winebuild: Fix import hint value for symbols imported by name.
This fixes incorrect hint values generated by dlltool: instead of the
index in the name table, it used the ordinal value, which almost always
ends up in a hint lookup failure and a fallback to binary search.
2022-11-08 20:07:52 +01:00
Rémi Bernon
6b9773529c winebuild: Implement delay import lib generation without dlltool. 2022-11-08 20:07:52 +01:00
Rémi Bernon
244e8fd357 winebuild: Enable unwind tables by default in PE files.
Making sure it also emits .cfi and .seh directives and generates unwind
tables for the delay import thunks.
2022-11-08 20:07:52 +01:00
Rémi Bernon
103eb83156 winebuild: Implement import lib generation without dlltool. 2022-11-08 20:07:52 +01:00
Rémi Bernon
b9375920f9 winebuild: Introduce a new --without-dlltool winebuild flag.
Set it only when -Wl,--delay-load linker flag is not supported to keep using
dlltool in LLVM builds, for MSVC-like import libs.
2022-11-08 20:07:52 +01:00
Rémi Bernon
9d1175a464 winebuild: Avoid calling asm_name twice in function arguments.
It returns a static buffer pointer and will free the first returned
pointer on the second call.
2022-11-04 21:53:54 +01:00
Rémi Bernon
fd7cee3e31 winebuild: Split output_static_lib into output_(import|static)_lib. 2022-11-03 18:33:09 +01:00
Rémi Bernon
f35fbc5be9 winebuild: Use asm_name to add underscore prefix in asm_globl. 2022-11-03 18:33:09 +01:00
Rémi Bernon
6932138f17 winebuild: Split get_link_name into a separate get_abi_name helper. 2022-11-03 18:33:09 +01:00
Alexandre Julliard
31d2a87ba0 winebuild: Add GNU stack note also to the undefined symbols file.
Recent ld complains about this.
2022-07-20 22:33:44 +02:00
Alexandre Julliard
603130cc38 winebuild: Align raw data size instead of virtual size in PE sections.
Use the aligned size to set code/data sizes.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-02 10:54:10 +01:00
Alexandre Julliard
8a3064899a winebuild: Add support for building apiset data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-18 22:10:20 +01:00
Alexandre Julliard
39f6ab55a9 winebuild: Add support for generating data-only DLLs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-16 22:05:33 +01:00
Alexandre Julliard
2c42d8b9a5 winebuild: Store length of Unicode strings explicitly.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:14 +01:00
Alexandre Julliard
c562952f92 tools: Add a helper function to read the contents of a file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 10:57:30 +01:00
Alexandre Julliard
49326cb258 tools: Use flush_output_buffer() in a few more places.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-19 10:55:08 +01:00
Jacek Caban
f4ddcc36e9 winebuild: Allow using clang for as command.
Since a9b5bb326a, Wine needs
get_as_command to work without cc_command available. While as is usually
a GCC dependency, Clang toolchains may not contain it.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 20:29:38 +01:00
Alexandre Julliard
b53773cff2 tools: Move the output buffer functions to the common header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Alexandre Julliard
d969d02e21 tools: Move target CPU and platform handling to the common tools.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:50:30 +01:00
Alexandre Julliard
61e210f196 winebuild: Get rid of PowerPC support.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:16:19 +01:00
Alexandre Julliard
414e1c8ad5 winebuild: Avoid resolving standard C functions with static importlibs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:19:33 +01:00
Alexandre Julliard
32cfdb5496 winebuild: Escape invalid characters in the dll name for static import libraries.
This is necessary for things like vulkan-1.dll.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-16 16:44:19 +01:00
Jacek Caban
c41059bcba winebuild: Use find_clang_tool for ld and nm tools.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-10 18:58:32 +01:00
Martin Storsjö
77e9095435 ntdll: Remove stack gap in syscalls on arm.
Store the original stack pointer (on entry to the syscall dispatcher)
in syscall_frame; the stack pointer itself is incremented by
"pop {r0-r3}" right before calling the syscall itself.

This fixes unwinding from functions set up by syscalls, like
KiUserExceptionDispatcher.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 22:02:56 +01:00