From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1433 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: noexecstack Date: Mon, 6 Aug 2012 07:32:30 -0400 Message-ID: <20120806113230.GB27715@brightrain.aerifal.cx> References: <20120805214624.GL544@brightrain.aerifal.cx> <20120806064306.GD30810@port70.net> <20120806093742.GA27715@brightrain.aerifal.cx> <20120806111918.GE30810@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1344252725 14709 80.91.229.3 (6 Aug 2012 11:32:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2012 11:32:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1434-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 06 13:32:05 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SyLXW-0003gX-K7 for gllmg-musl@plane.gmane.org; Mon, 06 Aug 2012 13:32:02 +0200 Original-Received: (qmail 32237 invoked by uid 550); 6 Aug 2012 11:32:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32229 invoked from network); 6 Aug 2012 11:32:01 -0000 Content-Disposition: inline In-Reply-To: <20120806111918.GE30810@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1433 Archived-At: On Mon, Aug 06, 2012 at 01:19:19PM +0200, Szabolcs Nagy wrote: > * Rich Felker [2012-08-06 05:37:42 -0400]: > > > ld -z noexecstack > > This should work for libc.so. Is there a way to do it for all the .o > > files in libc.a without having to add the option to every application, > > though? > > it seems gnu as has an undocumented --noexecstack flag for this > > gcc -Wa,--noexecstack -c foo.s > > adds the .notes.GNU-stack section So this seems to be the solution. I suspect it will need a configure check for the option being supported. Any other caveats? Rich