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 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