This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Mark libffi as not requiring executable stack on FreeBSD


Hi,
libffi on FreeBSD uses assembler source src/x86/freebsd.S which lacks
.note.GNU-stack section. As result, libffi shared library and any code
that links with libffi statically ends up with executable stack.

Patch below fixes the issue. Please apply.

commit 2b8152f633c6debae0b6076b0c39eb326ceb09e2
Author: Konstantin Belousov <kib@freebsd.org>
Date:   Sun Jul 29 04:06:39 2012 +0300

    On FreeBSD, mark the assembler source as not requiring executable stack.

diff --git a/src/x86/freebsd.S b/src/x86/freebsd.S
index afde513..ee6fc45 100644
--- a/src/x86/freebsd.S
+++ b/src/x86/freebsd.S
@@ -456,3 +456,4 @@ ffi_closure_raw_SYSV:
 #endif
 
 #endif /* ifndef __x86_64__ */
+	.section .note.GNU-stack,"",%progbits

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]