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]

Re: Mark libffi as not requiring executable stack on FreeBSD


On 28/07/12 9:14 PM, Konstantin Belousov wrote:
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.

ping.

commit 2b8152f633c6debae0b6076b0c39eb326ceb09e2
Author: Konstantin Belousov <kib-h+KGxgPPiopAfugRpC6u6w@public.gmane.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



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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