diff options
Diffstat (limited to 'app-emulation/wine-vanilla/files')
-rw-r--r-- | app-emulation/wine-vanilla/files/wine-vanilla-10.0-binutils2.44.patch | 105 | ||||
-rw-r--r-- | app-emulation/wine-vanilla/files/wine-vanilla-7.0-unwind.patch | 40 |
2 files changed, 105 insertions, 40 deletions
diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-10.0-binutils2.44.patch b/app-emulation/wine-vanilla/files/wine-vanilla-10.0-binutils2.44.patch new file mode 100644 index 000000000000..d7e30393569e --- /dev/null +++ b/app-emulation/wine-vanilla/files/wine-vanilla-10.0-binutils2.44.patch @@ -0,0 +1,105 @@ +Note that this is only an issue when using mingw (PE) binutils-2.44, +host (ELF) binutils-2.44 has no impact on this and, before this patch, +using 2.44 could only happen with off-by-default USE=crossdev-mingw. + +https://bugs.winehq.org/show_bug.cgi?id=57819 +https://sourceware.org/PR32675 +https://gitlab.winehq.org/wine/wine/-/merge_requests/7328 +--- a/dlls/ntdll/loader.c ++++ b/dlls/ntdll/loader.c +@@ -3750,5 +3750,5 @@ + NTSTATUS nts; + FARPROC fp; +- DWORD id; ++ INT_PTR id; + + TRACE( "(%p, %p, %p, %p, %p, 0x%08lx)\n", base, desc, dllhook, syshook, addr, flags ); +--- a/tools/winebuild/import.c ++++ b/tools/winebuild/import.c +@@ -1332,4 +1332,14 @@ + } + ++static void output_import_section( int index, int is_delay ) ++{ ++ if (!is_delay) ++ output( "\n\t.section .idata$%d\n", index ); ++ else if (index == 5) ++ output( "\n\t.section .data$didat%d\n", index ); ++ else ++ output( "\n\t.section .rdata$didat%d\n", index ); ++} ++ + /* create a Windows-style import library */ + static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struct strarray files ) +@@ -1455,18 +1465,18 @@ + output( "\t.long 0\n" ); /* TimeDateStamp */ + +- output( "\n\t.section .idata$5\n" ); ++ output_import_section( 5, is_delay ); + output( "\t%s 0\n", get_asm_ptr_keyword() ); /* FirstThunk tail */ + output( ".L__wine_import_addrs:\n" ); + +- output( "\n\t.section .idata$4\n" ); ++ output_import_section( 4, is_delay ); + output( "\t%s 0\n", get_asm_ptr_keyword() ); /* OriginalFirstThunk tail */ + output( ".L__wine_import_names:\n" ); + + /* required to avoid internal linker errors with some binutils versions */ +- output( "\n\t.section .idata$2\n" ); ++ output_import_section( 2, is_delay ); + } + else + { +- output( "\n\t.section .idata$2\n" ); ++ output_import_section( 2, is_delay ); + output( "%s\n", asm_globl( import_desc ) ); + output_rva( ".L__wine_import_names" ); /* OriginalFirstThunk */ +@@ -1476,8 +1486,8 @@ + output_rva( ".L__wine_import_addrs" ); /* FirstThunk */ + +- output( "\n\t.section .idata$4\n" ); ++ output_import_section( 4, is_delay ); + output( ".L__wine_import_names:\n" ); /* OriginalFirstThunk head */ + +- output( "\n\t.section .idata$5\n" ); ++ output_import_section( 5, is_delay ); + output( ".L__wine_import_addrs:\n" ); /* FirstThunk head */ + } +@@ -1490,9 +1500,9 @@ + new_output_as_file(); + +- output( "\n\t.section .idata$4\n" ); ++ output_import_section( 4, is_delay ); + output( "\t%s 0\n", get_asm_ptr_keyword() ); /* OriginalFirstThunk tail */ +- output( "\n\t.section .idata$5\n" ); ++ output_import_section( 5, is_delay ); + output( "\t%s 0\n", get_asm_ptr_keyword() ); /* FirstThunk tail */ +- output( "\n\t.section .idata$7\n" ); ++ output_import_section( 7, is_delay ); + output( "%s\n", asm_globl( import_name ) ); + output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name ); +@@ -1585,8 +1595,8 @@ + } + +- output( "\n\t.section .idata$4\n" ); ++ output_import_section( 4, is_delay ); + output_thunk_rva( by_name ? -1 : odp->ordinal, ".L__wine_import_name" ); + +- output( "\n\t.section .idata$5\n" ); ++ output_import_section( 5, is_delay ); + output( "%s\n", asm_globl( imp_name ) ); + if (is_delay) +@@ -1597,5 +1607,5 @@ + if (by_name) + { +- output( "\n\t.section .idata$6\n" ); ++ output_import_section( 6, is_delay ); + output( ".L__wine_import_name:\n" ); + output( "\t.short %d\n", odp->hint ); +@@ -1604,5 +1614,5 @@ + + /* reference head object to always pull its sections */ +- output( "\n\t.section .idata$7\n" ); ++ output_import_section( 7, is_delay ); + output_rva( "%s", asm_name( import_desc ) ); + diff --git a/app-emulation/wine-vanilla/files/wine-vanilla-7.0-unwind.patch b/app-emulation/wine-vanilla/files/wine-vanilla-7.0-unwind.patch deleted file mode 100644 index 74f22362ea9b..000000000000 --- a/app-emulation/wine-vanilla/files/wine-vanilla-7.0-unwind.patch +++ /dev/null @@ -1,40 +0,0 @@ -Fix build with llvm-libunwind, and also fix for non-llvm libunwind -when using clang+bfd given clang doesn't have _Unwind_Find_FDE in -its rtlib and expects it from llvm-libunwind. - -The _CONFIG_H_ check is for <llvm-libunwind-15 (adds _VERSION). ---- a/dlls/ntdll/unix/signal_x86_64.c -+++ b/dlls/ntdll/unix/signal_x86_64.c -@@ -635,7 +635,9 @@ - unsigned int cie_offset; - }; - -+#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) - extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *); -+#endif - - static unsigned char dwarf_get_u1( const unsigned char **p ) - { -@@ -1357,7 +1359,7 @@ - unw_proc_info_t info; - int rc; - --#ifdef __APPLE__ -+#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) - rc = unw_getcontext( &unw_context ); - if (rc == UNW_ESUCCESS) - rc = unw_init_local( &cursor, &unw_context ); -@@ -1480,11 +1482,13 @@ - NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context ) - { - struct dwarf_eh_bases bases; -+#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) - const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases ); - - if (fde) - return dwarf_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, fde, - &bases, &dispatch->LanguageHandler, &dispatch->HandlerData ); -+#endif - #ifdef HAVE_LIBUNWIND - return libunwind_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, - &dispatch->LanguageHandler, &dispatch->HandlerData ); |