winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
613 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Export a proper function for RtlGetNativeSystemInformation.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 7f53949a49f2fb59bab8c239e82a65f807071a7e URL:
https://gitlab.winehq.org/wine/wine/-/commit/7f53949a49f2fb59bab8c239e82a65…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 21 11:16:23 2024 +0200 ntdll: Export a proper function for RtlGetNativeSystemInformation. It will need custom handling on ARM64EC. --- dlls/ntdll/ntdll.spec | 3 +-- dlls/ntdll/signal_arm.c | 10 ++++++++++ dlls/ntdll/signal_arm64.c | 10 ++++++++++ dlls/ntdll/signal_arm64ec.c | 10 ++++++++++ dlls/ntdll/signal_i386.c | 10 ++++++++++ dlls/ntdll/signal_x86_64.c | 10 ++++++++++ 6 files changed, 51 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 3471905c762..80ed2d8f020 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -743,8 +743,7 @@ # @ stub RtlGetLengthWithoutTrailingPathSeperators @ stdcall RtlGetLocaleFileMappingAddress(ptr ptr ptr) @ stdcall RtlGetLongestNtPathLength() -@ stdcall -syscall -arch=win32 RtlGetNativeSystemInformation(long ptr long ptr) NtWow64GetNativeSystemInformation -@ stdcall -syscall -arch=win64 RtlGetNativeSystemInformation(long ptr long ptr) NtQuerySystemInformation +@ stdcall RtlGetNativeSystemInformation(long ptr long ptr) # @ stub RtlGetNextRange @ stdcall RtlGetNtGlobalFlags() @ stdcall RtlGetNtProductType(ptr) diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index f267b74781c..aeed022d78f 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -556,6 +556,16 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec } +/************************************************************************* + * RtlGetNativeSystemInformation (NTDLL.@) + */ +NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, + void *info, ULONG size, ULONG *ret_size ) +{ + return NtWow64GetNativeSystemInformation( class, info, size, ret_size ); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index b7c16ae7b30..8b4fea80bb6 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -590,6 +590,16 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec } +/************************************************************************* + * RtlGetNativeSystemInformation (NTDLL.@) + */ +NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, + void *info, ULONG size, ULONG *ret_size ) +{ + return NtQuerySystemInformation( class, info, size, ret_size ); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index 2e974d389e1..9fde2a4a715 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -1194,6 +1194,16 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec } +/************************************************************************* + * RtlGetNativeSystemInformation (NTDLL.@) + */ +NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, + void *info, ULONG size, ULONG *ret_size ) +{ + return NtQuerySystemInformation( class, info, size, ret_size ); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 13e5be6af68..a6c47f1226b 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -451,6 +451,16 @@ __ASM_STDCALL_FUNC( RtlRaiseException, 4, "ret $4" ) /* actually never returns */ +/************************************************************************* + * RtlGetNativeSystemInformation (NTDLL.@) + */ +NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, + void *info, ULONG size, ULONG *ret_size ) +{ + return NtWow64GetNativeSystemInformation( class, info, size, ret_size ); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index d6218dc61b7..f491f07282e 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -792,6 +792,16 @@ __ASM_GLOBAL_FUNC( RtlRaiseException, "call " __ASM_NAME("RtlRaiseStatus") /* does not return */ ); +/************************************************************************* + * RtlGetNativeSystemInformation (NTDLL.@) + */ +NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, + void *info, ULONG size, ULONG *ret_size ) +{ + return NtQuerySystemInformation( class, info, size, ret_size ); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */
1
0
0
0
Alexandre Julliard : ntdll: Simplify preloader execution using HAVE_WINE_PRELOADER.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 7830153c38b185ff9f9f20f8d37db977a934c600 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7830153c38b185ff9f9f20f8d37db9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 21 17:32:13 2024 +0200 ntdll: Simplify preloader execution using HAVE_WINE_PRELOADER. --- dlls/ntdll/unix/loader.c | 76 +++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 52 deletions(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 41730064a51..f8420dd9e62 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -147,12 +147,6 @@ SYSTEM_SERVICE_TABLE KeServiceDescriptorTable[4] = static void fatal_error( const char *err, ... ) __attribute__((noreturn, format(printf,1,2))); #endif -#ifdef HAVE_WINE_PRELOADER -static const BOOL use_preloader = TRUE; -#else -static const BOOL use_preloader = FALSE; -#endif - static const char *bin_dir; static const char *dll_dir; static const char *ntdll_dir; @@ -500,31 +494,30 @@ char *get_alternate_wineloader( WORD machine ) static void preloader_exec( char **argv ) { - if (use_preloader) - { - static const char *preloader = "wine-preloader"; - char *p; +#ifdef HAVE_WINE_PRELOADER + static const char *preloader = "wine-preloader"; + char *p; - if (!(p = strrchr( argv[1], '/' ))) p = argv[1]; - else p++; + if (!(p = strrchr( argv[1], '/' ))) p = argv[1]; + else p++; - if (strlen(p) > 2 && !strcmp( p + strlen(p) - 2, "64" )) preloader = "wine64-preloader"; - argv[0] = malloc( p - argv[1] + strlen(preloader) + 1 ); - memcpy( argv[0], argv[1], p - argv[1] ); - strcpy( argv[0] + (p - argv[1]), preloader ); + if (strlen(p) > 2 && !strcmp( p + strlen(p) - 2, "64" )) preloader = "wine64-preloader"; + argv[0] = malloc( p - argv[1] + strlen(preloader) + 1 ); + memcpy( argv[0], argv[1], p - argv[1] ); + strcpy( argv[0] + (p - argv[1]), preloader ); #ifdef __APPLE__ - { - posix_spawnattr_t attr; - posix_spawnattr_init( &attr ); - posix_spawnattr_setflags( &attr, POSIX_SPAWN_SETEXEC | _POSIX_SPAWN_DISABLE_ASLR ); - posix_spawn( NULL, argv[0], NULL, &attr, argv, *_NSGetEnviron() ); - posix_spawnattr_destroy( &attr ); - } -#endif - execv( argv[0], argv ); - free( argv[0] ); + { + posix_spawnattr_t attr; + posix_spawnattr_init( &attr ); + posix_spawnattr_setflags( &attr, POSIX_SPAWN_SETEXEC | _POSIX_SPAWN_DISABLE_ASLR ); + posix_spawn( NULL, argv[0], NULL, &attr, argv, *_NSGetEnviron() ); + posix_spawnattr_destroy( &attr ); } +#endif + execv( argv[0], argv ); + free( argv[0] ); +#endif execv( argv[1], argv + 1 ); } @@ -2035,18 +2028,7 @@ static void apple_main_thread(void) #endif /* __APPLE__ */ -#ifdef __ANDROID__ - -static int pre_exec(void) -{ -#if defined(__i386__) || defined(__x86_64__) - return 1; /* we have a preloader */ -#else - return 0; /* no exec needed */ -#endif -} - -#elif defined(__linux__) && (defined(__i386__) || defined(__arm__)) +#if defined(__linux__) && !defined(__ANDROID__) && (defined(__i386__) || defined(__arm__)) static void check_vmsplit( void *stack ) { @@ -2067,20 +2049,6 @@ static int pre_exec(void) return 1; /* we have a preloader on x86/arm */ } -#elif defined(__linux__) && (defined(__x86_64__) || defined(__aarch64__)) - -static int pre_exec(void) -{ - return 1; /* we have a preloader on x86-64/arm64 */ -} - -#elif defined(__APPLE__) && defined(HAVE_WINE_PRELOADER) - -static int pre_exec(void) -{ - return 1; /* we have a preloader */ -} - #elif (defined(__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__DragonFly__)) static int pre_exec(void) @@ -2097,7 +2065,11 @@ static int pre_exec(void) static int pre_exec(void) { +#ifdef HAVE_WINE_PRELOADER + return 1; /* we have a preloader */ +#else return 0; /* no exec needed */ +#endif } #endif
1
0
0
0
Brendan Shanks : loader: Use zerofill sections instead of preloader on macOS when building with Xcode 15.3.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 7b82f507bda6b94f6876256c278d3b3637e95b8c URL:
https://gitlab.winehq.org/wine/wine/-/commit/7b82f507bda6b94f6876256c278d3b…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Apr 11 12:24:55 2024 -0700 loader: Use zerofill sections instead of preloader on macOS when building with Xcode 15.3. Xcode 15.3 adds a new linker flag ('-no_huge') which allows the loader to use zero-fill sections to reserve the areas currently being reserved by the preloader. This means the preloader is no longer needed (a good thing, since it's heavily dependent on private APIs). The preloader will still be used when Xcode <15.3 is being used, or when building for i386 (32-bit for 10.14 and earlier). --- configure | 37 +++++++++++++++++++++++++++++++++++-- configure.ac | 11 +++++++++-- loader/main.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 4 deletions(-) diff --git a/configure b/configure index d4101bf79d0..e77f0893dd8 100755 --- a/configure +++ b/configure @@ -9534,8 +9534,41 @@ fi WINELOADER_LDFLAGS="-Wl,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" case $HOST_ARCH in - i386|x86_64) wine_use_preloader=yes ;; - *) wine_use_preloader=no ;; + i386) wine_use_preloader=yes ;; + x86_64) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_huge" >&5 +printf %s "checking whether the compiler supports -Wl,-no_huge... " >&6; } +if test ${ac_cv_cflags__Wl__no_huge+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_wine_try_cflags_saved=$CFLAGS +CFLAGS="$CFLAGS -Wl,-no_huge" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(int argc, char **argv) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_cflags__Wl__no_huge=yes +else $as_nop + ac_cv_cflags__Wl__no_huge=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +CFLAGS=$ac_wine_try_cflags_saved +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__no_huge" >&5 +printf "%s\n" "$ac_cv_cflags__Wl__no_huge" >&6; } +if test "x$ac_cv_cflags__Wl__no_huge" = xyes +then : + wine_use_preloader=no + WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-no_pie,-image_base,0x200000000,-no_huge,-no_fixup_chains,-segalign,0x1000,-segaddr,WINE_RESERVE,0x1000,-segaddr,WINE_TOP_DOWN,0x7ff000000000" +else $as_nop + wine_use_preloader=yes +fi + ;; + *) wine_use_preloader=no ;; esac if test "$wine_use_preloader" = "yes" diff --git a/configure.ac b/configure.ac index c73562ba58c..e828083fc91 100644 --- a/configure.ac +++ b/configure.ac @@ -640,8 +640,15 @@ case $host_os in WINELOADER_LDFLAGS="-Wl,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" case $HOST_ARCH in - i386|x86_64) wine_use_preloader=yes ;; - *) wine_use_preloader=no ;; + i386) wine_use_preloader=yes ;; + x86_64) + dnl If the -no_huge linker option is present (added in Xcode 15.3), use zerofill sections instead of the preloader + WINE_TRY_CFLAGS([-Wl,-no_huge], + [wine_use_preloader=no + WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-no_pie,-image_base,0x200000000,-no_huge,-no_fixup_chains,-segalign,0x1000,-segaddr,WINE_RESERVE,0x1000,-segaddr,WINE_TOP_DOWN,0x7ff000000000"], + [wine_use_preloader=yes]) + ;; + *) wine_use_preloader=no ;; esac if test "$wine_use_preloader" = "yes" diff --git a/loader/main.c b/loader/main.c index c258e025183..b241dbb454d 100644 --- a/loader/main.c +++ b/loader/main.c @@ -25,6 +25,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> @@ -38,9 +39,51 @@ extern char **environ; +#if defined(__APPLE__) && defined(__x86_64__) && !defined(HAVE_WINE_PRELOADER) + +/* Not using the preloader on x86_64: + * Reserve the same areas as the preloader does, but using zero-fill sections + * (the only way to prevent system frameworks from using them, including allocations + * before main() runs). + */ +__asm__(".zerofill WINE_RESERVE,WINE_RESERVE"); +static char __wine_reserve[0x1fffff000] __attribute__((section("WINE_RESERVE, WINE_RESERVE"))); + +__asm__(".zerofill WINE_TOP_DOWN,WINE_TOP_DOWN"); +static char __wine_top_down[0x001ff0000] __attribute__((section("WINE_TOP_DOWN, WINE_TOP_DOWN"))); + +static const struct wine_preload_info preload_info[] = +{ + { __wine_reserve, sizeof(__wine_reserve) }, /* 0x1000 - 0x200000000: low 8GB */ + { __wine_top_down, sizeof(__wine_top_down) }, /* 0x7ff000000000 - 0x7ff001ff0000: top-down allocations + virtual heap */ + { 0, 0 } /* end of list */ +}; + +const __attribute((visibility("default"))) struct wine_preload_info *wine_main_preload_info = preload_info; + +static void init_reserved_areas(void) +{ + int i; + + for (i = 0; wine_main_preload_info[i].size != 0; i++) + { + /* Match how the preloader maps reserved areas: */ + mmap(wine_main_preload_info[i].addr, wine_main_preload_info[i].size, PROT_NONE, + MAP_FIXED | MAP_NORESERVE | MAP_PRIVATE | MAP_ANON, -1, 0); + } +} + +#else + /* the preloader will set this variable */ const __attribute((visibility("default"))) struct wine_preload_info *wine_main_preload_info = NULL; +static void init_reserved_areas(void) +{ +} + +#endif + /* canonicalize path and return its directory name */ static char *realpath_dirname( const char *name ) { @@ -177,6 +220,8 @@ int main( int argc, char *argv[] ) { void *handle; + init_reserved_areas(); + if ((handle = load_ntdll( argv[0] ))) { void (*init_func)(int, char **, char **) = dlsym( handle, "__wine_main" );
1
0
0
0
Brendan Shanks : configure: Define HAVE_WINE_PRELOADER when the preloader is being built.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 5da03c7a60b9bd46aa1e28092957b5aaa0655d15 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5da03c7a60b9bd46aa1e28092957b5…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Apr 4 11:59:51 2024 -0700 configure: Define HAVE_WINE_PRELOADER when the preloader is being built. --- configure | 3 +++ configure.ac | 1 + dlls/ntdll/unix/loader.c | 4 ++-- include/config.h.in | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 355d33982ba..d4101bf79d0 100755 --- a/configure +++ b/configure @@ -20457,6 +20457,9 @@ if test "$wine_use_preloader" = "yes" then test "$wine_binary" = wine || as_fn_append CONFIGURE_TARGETS " loader/wine-preloader" WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" + +printf "%s\n" "#define HAVE_WINE_PRELOADER 1" >>confdefs.h + fi diff --git a/configure.ac b/configure.ac index bcfa803035d..c73562ba58c 100644 --- a/configure.ac +++ b/configure.ac @@ -2042,6 +2042,7 @@ if test "$wine_use_preloader" = "yes" then test "$wine_binary" = wine || WINE_IGNORE_FILE(loader/wine-preloader) WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" + AC_DEFINE(HAVE_WINE_PRELOADER, 1, [Define to 1 if the Wine preloader is being used.]) fi dnl **** Check for functions **** diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 8cf6abed3da..41730064a51 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -147,7 +147,7 @@ SYSTEM_SERVICE_TABLE KeServiceDescriptorTable[4] = static void fatal_error( const char *err, ... ) __attribute__((noreturn, format(printf,1,2))); #endif -#if defined(linux) || defined(__APPLE__) +#ifdef HAVE_WINE_PRELOADER static const BOOL use_preloader = TRUE; #else static const BOOL use_preloader = FALSE; @@ -2074,7 +2074,7 @@ static int pre_exec(void) return 1; /* we have a preloader on x86-64/arm64 */ } -#elif defined(__APPLE__) && (defined(__i386__) || defined(__x86_64__)) +#elif defined(__APPLE__) && defined(HAVE_WINE_PRELOADER) static int pre_exec(void) { diff --git a/include/config.h.in b/include/config.h.in index ef783c75a42..aa066a87ad7 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -642,6 +642,9 @@ /* Define to 1 if you have the <valgrind/valgrind.h> header file. */ #undef HAVE_VALGRIND_VALGRIND_H +/* Define to 1 if the Wine preloader is being used. */ +#undef HAVE_WINE_PRELOADER + /* Define to 1 if you have the <X11/extensions/shape.h> header file. */ #undef HAVE_X11_EXTENSIONS_SHAPE_H
1
0
0
0
Brendan Shanks : configure: Rename wine_can_build_preloader to wine_use_preloader, and also use it for Linux.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 266e95a21b38c6b8e0d33b19d3d5fb23cfd75db9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/266e95a21b38c6b8e0d33b19d3d5fb…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Apr 4 11:49:06 2024 -0700 configure: Rename wine_can_build_preloader to wine_use_preloader, and also use it for Linux. --- configure | 22 ++++++++++------------ configure.ac | 22 ++++++++++------------ 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 19deca2d311..355d33982ba 100755 --- a/configure +++ b/configure @@ -9534,11 +9534,11 @@ fi WINELOADER_LDFLAGS="-Wl,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" case $HOST_ARCH in - i386|x86_64) wine_can_build_preloader=yes ;; - *) wine_can_build_preloader=no ;; + i386|x86_64) wine_use_preloader=yes ;; + *) wine_use_preloader=no ;; esac - if test "$wine_can_build_preloader" = "yes" + if test "$wine_use_preloader" = "yes" then WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_pie" >&5 @@ -20448,19 +20448,17 @@ case $host_os in linux*) if test $HOST_ARCH != unknown then - test "$wine_binary" = wine || as_fn_append CONFIGURE_TARGETS " loader/wine-preloader" - WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" - fi - ;; - darwin*|macosx*) - if test "$wine_can_build_preloader" = "yes" - then - test "$wine_binary" = wine || as_fn_append CONFIGURE_TARGETS " loader/wine-preloader" - WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" + wine_use_preloader=yes fi ;; esac +if test "$wine_use_preloader" = "yes" +then + test "$wine_binary" = wine || as_fn_append CONFIGURE_TARGETS " loader/wine-preloader" + WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" +fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 printf %s "checking for library containing dlopen... " >&6; } diff --git a/configure.ac b/configure.ac index 738622d7890..bcfa803035d 100644 --- a/configure.ac +++ b/configure.ac @@ -640,11 +640,11 @@ case $host_os in WINELOADER_LDFLAGS="-Wl,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" case $HOST_ARCH in - i386|x86_64) wine_can_build_preloader=yes ;; - *) wine_can_build_preloader=no ;; + i386|x86_64) wine_use_preloader=yes ;; + *) wine_use_preloader=no ;; esac - if test "$wine_can_build_preloader" = "yes" + if test "$wine_use_preloader" = "yes" then WINEPRELOADER_LDFLAGS="-nostartfiles -nodefaultlibs -e _start -ldylib1.o -mmacosx-version-min=10.7 -Wl,-no_new_main,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" WINE_TRY_CFLAGS([-Wl,-no_pie], @@ -2033,19 +2033,17 @@ case $host_os in linux*) if test $HOST_ARCH != unknown then - test "$wine_binary" = wine || WINE_IGNORE_FILE(loader/wine-preloader) - WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" - fi - ;; - darwin*|macosx*) - if test "$wine_can_build_preloader" = "yes" - then - test "$wine_binary" = wine || WINE_IGNORE_FILE(loader/wine-preloader) - WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" + wine_use_preloader=yes fi ;; esac +if test "$wine_use_preloader" = "yes" +then + test "$wine_binary" = wine || WINE_IGNORE_FILE(loader/wine-preloader) + WINELOADER_PROGRAMS="$WINELOADER_PROGRAMS $wine_binary-preloader" +fi + dnl **** Check for functions **** dnl Check for -ldl
1
0
0
0
Brendan Shanks : configure: Remove warning when not using preloader on macOS.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 9669cd56f465e0683f1f229160d4891c13300178 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9669cd56f465e0683f1f229160d489…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Apr 4 11:47:58 2024 -0700 configure: Remove warning when not using preloader on macOS. --- configure | 2 -- configure.ac | 2 -- 2 files changed, 4 deletions(-) diff --git a/configure b/configure index b73fa3db003..19deca2d311 100755 --- a/configure +++ b/configure @@ -9578,8 +9578,6 @@ fi ;; esac WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -mmacosx-version-min=10.7" - else - as_fn_append wine_warnings "|can't build Wine preloader; many programs won't work" fi if test "x$with_coreaudio" != "xno"; diff --git a/configure.ac b/configure.ac index da503dedf0f..738622d7890 100644 --- a/configure.ac +++ b/configure.ac @@ -659,8 +659,6 @@ case $host_os in esac dnl If preloader is used, the loader needs to be an LC_UNIXTHREAD binary to avoid AppKit/Core Animation problems. WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -mmacosx-version-min=10.7" - else - WINE_WARNING([can't build Wine preloader; many programs won't work]) fi if test "x$with_coreaudio" != "xno";
1
0
0
0
Brendan Shanks : configure: Don't build wineloader on macOS with '-pie'.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 1f79e7697b6ee803fcd904041712ebaafe9c2855 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1f79e7697b6ee803fcd904041712eb…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Jul 20 10:22:30 2023 -0700 configure: Don't build wineloader on macOS with '-pie'. This is already the default for all Mac binaries targeting 10.7 or later. --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4a60f6a048a..b73fa3db003 100755 --- a/configure +++ b/configure @@ -9531,7 +9531,7 @@ fi SYSTEMCONFIGURATION_LIBS="-framework SystemConfiguration" - WINELOADER_LDFLAGS="-Wl,-pie,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" + WINELOADER_LDFLAGS="-Wl,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" case $HOST_ARCH in i386|x86_64) wine_can_build_preloader=yes ;; diff --git a/configure.ac b/configure.ac index 0870961c041..da503dedf0f 100644 --- a/configure.ac +++ b/configure.ac @@ -637,7 +637,7 @@ case $host_os in AC_SUBST(SECURITY_LIBS,"-framework Security -framework CoreFoundation") AC_SUBST(SYSTEMCONFIGURATION_LIBS,"-framework SystemConfiguration") - WINELOADER_LDFLAGS="-Wl,-pie,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" + WINELOADER_LDFLAGS="-Wl,-segalign,0x1000,-pagezero_size,0x1000,-sectcreate,__TEXT,__info_plist,loader/wine_info.plist" case $HOST_ARCH in i386|x86_64) wine_can_build_preloader=yes ;;
1
0
0
0
Rémi Bernon : include: Define frexpf as inline function in more cases.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: f5a739ce6262d15e2862f0a482efe4db4b38206c URL:
https://gitlab.winehq.org/wine/wine/-/commit/f5a739ce6262d15e2862f0a482efe4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Jun 20 23:02:55 2024 +0200 include: Define frexpf as inline function in more cases. --- include/msvcrt/math.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h index 8238c5803b4..03c4bf57f59 100644 --- a/include/msvcrt/math.h +++ b/include/msvcrt/math.h @@ -159,7 +159,6 @@ _ACRTIMP float __cdecl powf(float, float); _ACRTIMP float __cdecl sqrtf(float); _ACRTIMP float __cdecl ceilf(float); _ACRTIMP float __cdecl floorf(float); -_ACRTIMP float __cdecl frexpf(float, int*); _ACRTIMP float __cdecl modff(float, float*); _ACRTIMP float __cdecl fmodf(float, float); @@ -186,7 +185,6 @@ static inline float powf(float x, float y) { return pow(x, y); } static inline float sqrtf(float x) { return sqrt(x); } static inline float ceilf(float x) { return ceil(x); } static inline float floorf(float x) { return floor(x); } -static inline float frexpf(float x, int *y) { return frexp(x, y); } static inline float modff(float x, float *y) { double yd, ret = modf(x, &yd); *y = yd; return ret; } static inline float fmodf(float x, float y) { return fmod(x, y); } @@ -209,6 +207,12 @@ static inline int _fpclassf(float x) #endif +#if (defined(__x86_64__) && !defined(_UCRT)) || defined(_NO_CRT_MATH_INLINE) +_ACRTIMP float __cdecl frexpf(float, int*); +#else +static inline float frexpf(float x, int *y) { return frexp(x, y); } +#endif + #if (!defined(__i386__) && !defined(__x86_64__) && (_MSVCR_VER == 0 || _MSVCR_VER >= 110)) || defined(_NO_CRT_MATH_INLINE) _ACRTIMP float __cdecl fabsf(float); #else
1
0
0
0
Rémi Bernon : include: Add a couple of CRT function declarations.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: dea96222b42080f0c081454089422100335db10d URL:
https://gitlab.winehq.org/wine/wine/-/commit/dea96222b42080f0c0814540894221…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Jun 4 20:42:48 2024 +0200 include: Add a couple of CRT function declarations. --- include/msvcrt/math.h | 3 +++ include/msvcrt/stdlib.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h index fc7de676c83..8238c5803b4 100644 --- a/include/msvcrt/math.h +++ b/include/msvcrt/math.h @@ -111,6 +111,9 @@ _ACRTIMP float __cdecl truncf(float); _ACRTIMP int __cdecl ilogb(double); _ACRTIMP int __cdecl ilogbf(float); +_ACRTIMP float __cdecl fmaf(float x, float y, float z); +_ACRTIMP double __cdecl fma(double x, double y, double z); + _ACRTIMP __int64 __cdecl llrint(double); _ACRTIMP __int64 __cdecl llrintf(float); _ACRTIMP __int64 __cdecl llround(double); diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index f1ffcd8c035..f3df662528a 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -238,6 +238,8 @@ _ACRTIMP unsigned __int64 __cdecl _strtoui64_l(const char*,char**,int,_locale_t) _ACRTIMP int __cdecl system(const char*); _ACRTIMP void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (__cdecl *)(const void*,const void*)); _ACRTIMP void __cdecl qsort(void*,size_t,size_t,int (__cdecl *)(const void*,const void*)); +_ACRTIMP void __cdecl qsort_s(void*,size_t,size_t,int (__cdecl *)(void*,const void*,const void*),void*); +_ACRTIMP unsigned int __cdecl _set_abort_behavior(unsigned int flags, unsigned int mask); typedef void (__cdecl *_purecall_handler)(void); _ACRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler);
1
0
0
0
Zhiyi Zhang : kernel32: Add AppPolicyGetWindowingModel().
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 53d03fb0a537ce99a464da2c3f416e033dad3153 URL:
https://gitlab.winehq.org/wine/wine/-/commit/53d03fb0a537ce99a464da2c3f416e…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu May 9 11:06:45 2024 +0800 kernel32: Add AppPolicyGetWindowingModel(). --- dlls/kernel32/kernel32.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 28a3f554374..179d49ba7cb 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -158,6 +158,7 @@ @ stdcall ApplicationRecoveryFinished(long) @ stdcall ApplicationRecoveryInProgress(ptr) @ stdcall AppPolicyGetMediaFoundationCodecLoading(ptr ptr) kernelbase.AppPolicyGetMediaFoundationCodecLoading +@ stdcall AppPolicyGetWindowingModel(ptr ptr) kernelbase.AppPolicyGetWindowingModel @ stdcall -import AreFileApisANSI() @ stdcall AssignProcessToJobObject(ptr ptr) @ stdcall -import AttachConsole(long)
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
62
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Results per page:
10
25
50
100
200