public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Konstantin Belousov <kostikbel@gmail.com>
To: libffi-discuss@sourceware.org
Subject: Mark libffi as not requiring executable stack on FreeBSD
Date: Sun, 29 Jul 2012 01:15:00 -0000	[thread overview]
Message-ID: <20120729011435.GN2676@deviant.kiev.zoral.com.ua> (raw)

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

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 #2: Type: application/pgp-signature, Size: 196 bytes --]

             reply	other threads:[~2012-07-29  1:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29  1:15 Konstantin Belousov [this message]
2013-11-04 23:39 ` Brad Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120729011435.GN2676@deviant.kiev.zoral.com.ua \
    --to=kostikbel@gmail.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).