This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[patch] libffi.so.6 in libffi-3.1 is built with execstacks because of missing GNU stack marking in win32.S
- From: Samuli Suominen <ssuominen at gentoo dot org>
- To: libffi-discuss at sourceware dot org
- Date: Wed, 28 May 2014 16:31:06 +0300
- Subject: [patch] libffi.so.6 in libffi-3.1 is built with execstacks because of missing GNU stack marking in win32.S
- Authentication-results: sourceware.org; auth=none
Downstream report you should read,
http://bugs.gentoo.org/show_bug.cgi?id=511634
Basically Makefile's are always including src/x86/win32.S even on a
non-windows system, and win32.S is missing the GNU stack
marking other files already have:
Makefile.am has:
if X86
nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S src/x86/win32.S
endif
and it doesn't have the
#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",@progbits
#endif
other files like sysv.S, unix64.S, freebsd.S, already have
The attached patch fixes the executable stack in libffi.so.6
http://bugs.gentoo.org/511634
--- src/x86/win32.S
+++ src/x86/win32.S
@@ -1304,3 +1304,6 @@
#endif /* !_MSC_VER */
+#if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",@progbits
+#endif