* QA Notice: The following files contain writable and executable sections * Files with such sections will not work properly (or at all!) on some * architectures/operating systems. A bug should be filed at * https://bugs.gentoo.org/ to make sure the issue is fixed. * For more information, see: * * https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart * * Please include the following list of files in your report: * Note: Bugs should be filed for the respective maintainers * of the package in question and not hardened@gentoo.org. * !WX --- --- usr/lib64/ghc-9.2.8/rts/libHSrts_thr_l.a:StgCRunAsm.thr_l_o * !WX --- --- usr/lib64/ghc-9.2.8/rts/libHSrts_thr.a:StgCRunAsm.thr_o * !WX --- --- usr/lib64/ghc-9.2.8/rts/libHSrts_l.a:StgCRunAsm.l_o * !WX --- --- usr/lib64/ghc-9.2.8/rts/libHSrts_thr_debug.a:StgCRunAsm.thr_debug_o * !WX --- --- usr/lib64/ghc-9.2.8/rts/libHSrts_debug.a:StgCRunAsm.debug_o * !WX --- --- usr/lib64/ghc-9.2.8/rts/libHSrts.a:StgCRunAsm.o Reproducible: Always On x86_64, the object file is essentially empty. The source includes GNU stack progbits for several architectures, but not for x86_64. The following change solves the notice: diff -urNp ghc-9.2.8-orig/rts/StgCRunAsm.S ghc-9.2.8-dwok/rts/StgCRunAsm.S --- ghc-9.2.8-orig/rts/StgCRunAsm.S 2023-05-26 01:03:00.000000000 +0200 +++ ghc-9.2.8-dwok/rts/StgCRunAsm.S 2023-12-27 09:39:41.747353995 +0100 @@ -376,6 +376,11 @@ StgReturn: .size StgReturn, .-StgReturn .section .note.GNU-stack,"",@progbits +#else +/* mark stack as nonexecutable */ +#if defined(__linux__) && defined(__ELF__) + .section .note.GNU-stack,"",@progbits +#endif #endif #endif /* !USE_MINIINTERPRETER */
Created attachment 880786 [details, diff] ghc-9.2.8_StgCRunAsm-GNU-stack.patch Proposed patch solves the notice.