From patchwork Thu Dec 15 12:48:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Tobler X-Patchwork-Id: 131694 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 09CA81007D4 for ; Fri, 16 Dec 2011 03:15:20 +1100 (EST) Received: (qmail 20278 invoked by alias); 15 Dec 2011 16:15:15 -0000 Received: (qmail 20267 invoked by uid 22791); 15 Dec 2011 16:15:13 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, DATE_IN_PAST_03_06, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.fgznet.ch (HELO smtp.fgznet.ch) (81.92.96.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Dec 2011 16:14:59 +0000 Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id pBFGCW2W035259; Thu, 15 Dec 2011 17:12:34 +0100 (CET) (envelope-from andreast-list@fgznet.ch) Message-ID: <4EE9ECB6.30000@fgznet.ch> Date: Thu, 15 Dec 2011 13:48:54 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: GCC Patches , Loren James Rittle Subject: [patch] FreeBSD x86 emit note.GNU-stack section 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 all, I'd like to commit the below patch to trunk and gcc-4.6.x. The functionality has been in the FreeBSD base compiler since nearly 12 months now. Is this ok for trunk, I know we're in stage three? And for gcc-4.6 branch? Tested with bootstrap/test (results follow) and 'readelf -l gcc/xgcc': GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 8 Thanks, Andreas 2011-12-15 Andreas Tobler * config/i386/freebsd.h (TARGET_ASM_FILE_END): Define. Index: config/i386/freebsd.h =================================================================== --- config/i386/freebsd.h (revision 182359) +++ config/i386/freebsd.h (working copy) @@ -145,3 +145,6 @@ #if FBSD_MAJOR >= 6 #define SUBTARGET32_DEFAULT_CPU "i486" #endif + +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack +