On Tuesday 27 December 2022 14:38:00 LIU Hao wrote: > Variables that are required to be placed in explicit sections probably > have special meanings, and shall not be eliminated by LTO. Preserving > all of them might look an overkill, but should be safest. > > Signed-off-by: LIU Hao <lh_mo...@126.com> > --- > mingw-w64-crt/include/sect_attribs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mingw-w64-crt/include/sect_attribs.h > b/mingw-w64-crt/include/sect_attribs.h > index 31b05da8e..66087d782 100644 > --- a/mingw-w64-crt/include/sect_attribs.h > +++ b/mingw-w64-crt/include/sect_attribs.h > @@ -65,7 +65,7 @@ > #if defined(_MSC_VER) > #define _CRTALLOC(x) __declspec(allocate(x)) > #elif defined(__GNUC__) > -#define _CRTALLOC(x) __attribute__ ((section (x) )) > +#define _CRTALLOC(x) __attribute__ ((section (x), used)) > #else > #error Your compiler is not supported. > #endif > -- > 2.39.0 >
Looks good. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public