Jacek Caban : winegcc: Disable exporting all symbols on mingw targets.
Module: wine Branch: master Commit: b0908666639d5dfe825b5d5f3b9893bed00822d2 URL: https://gitlab.winehq.org/wine/wine/-/commit/b0908666639d5dfe825b5d5f3b9893b... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jun 26 21:00:54 2023 +0200 winegcc: Disable exporting all symbols on mingw targets. Mingw targets export all symbols by default if there is no explicit export. We generate export table in winebuild and don't use explicit exports. This may make linker generate an unused export-all table. Spotted by Gabriel Ivăncescu. --- tools/winegcc/winegcc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index b6a6c42068d..9d73252411b 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -407,6 +407,7 @@ static struct strarray get_link_args( struct options *opts, const char *output_n if (opts->nostartfiles || opts->use_msvcrt) strarray_add( &flags, "-nostartfiles" ); if (opts->subsystem) strarray_add( &flags, strmake("-Wl,--subsystem,%s", opts->subsystem )); + strarray_add( &flags, "-Wl,--exclude-all-symbols" ); strarray_add( &flags, "-Wl,--nxcompat" ); if (opts->image_base) strarray_add( &flags, strmake("-Wl,--image-base,%s", opts->image_base ));
participants (1)
-
Alexandre Julliard