From patchwork Thu Jul 26 00:52:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 173310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id CC7312C008F for ; Thu, 26 Jul 2012 10:52:23 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1343868744; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=kq2JM9V JPWCKQNTQ4jUg1y1llxo=; b=nRp0yYWHU4MzM38DGRoH1Fm9UTAHeb00mAomPj6 Oy1QxuqUG2V8/V0OUwHJmquFIG2ZwXptrKSBB7Z/IEg32lhe/OFvwt+nPiXEbAFl ehJTmYIqDliiCN2GWwXrQoKODzAm1z5bFoWyCwgj/O6oluhU5JMMOPPYSBovz/jX iq6k= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=t0eSXvI8dKM10zZ02inX+mKooakuGWRE8kXeD0XD3CtUBmbIz2+y+rD5rjk2SM yk39tZorhdEaI5pdWJlducIxPxtjKB1HERlW5uLo07zg+0vuKrSP4QnthMMafGK7 FnWYnB31gYZUhqjoGduNEPxs996mqLMDWz/rr6StTWiyQ=; Received: (qmail 24983 invoked by alias); 26 Jul 2012 00:52:18 -0000 Received: (qmail 24974 invoked by uid 22791); 26 Jul 2012 00:52:17 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-we0-f175.google.com (HELO mail-we0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Jul 2012 00:52:04 +0000 Received: by weyr6 with SMTP id r6so1109441wey.20 for ; Wed, 25 Jul 2012 17:52:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.98.138 with SMTP id ei10mr8926651wib.1.1343263922839; Wed, 25 Jul 2012 17:52:02 -0700 (PDT) Received: by 10.216.66.8 with HTTP; Wed, 25 Jul 2012 17:52:02 -0700 (PDT) Date: Wed, 25 Jul 2012 17:52:02 -0700 Message-ID: Subject: [PATCH/MIPS] Emit stack executable note From: Andrew Pinski To: GCC Patches X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, The Linux kernel already supports non-executable stack since around February 2010. This patch has GCC emit the notes that are associated with non-executable stack. OK? Bootstrapped and tested on mips64-linux-gnu with kernel already supporting the non-executable stack with no regressions. Thanks, Andrew Pinski ChangeLog: * config/mips/linux-common.h (TARGET_ASM_FILE_END): Define. Index: config/mips/linux-common.h =================================================================== --- config/mips/linux-common.h (revision 189877) +++ config/mips/linux-common.h (working copy) @@ -56,3 +56,7 @@ along with GCC; see the file COPYING3. GNU_USER_TARGET_ENDFILE_SPEC, \ GNU_USER_TARGET_MATHFILE_SPEC " " \ ANDROID_ENDFILE_SPEC) + +/* For MIPS, the default is to assume *no* executable stack, so output + an executable-stack-note only when needed. */ +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack