From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1126 invoked by alias); 6 Jul 2009 18:45:40 -0000 Received: (qmail 1114 invoked by uid 22791); 6 Jul 2009 18:45:39 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jul 2009 18:45:31 +0000 Received: from wpaz24.hot.corp.google.com (wpaz24.hot.corp.google.com [172.24.198.88]) by smtp-out.google.com with ESMTP id n66IjRko005516 for ; Mon, 6 Jul 2009 19:45:28 +0100 Received: from pzk3 (pzk3.prod.google.com [10.243.19.131]) by wpaz24.hot.corp.google.com with ESMTP id n66IjOAx020001 for ; Mon, 6 Jul 2009 11:45:25 -0700 Received: by pzk3 with SMTP id 3so3815716pzk.22 for ; Mon, 06 Jul 2009 11:45:24 -0700 (PDT) Received: by 10.114.184.7 with SMTP id h7mr8074082waf.171.1246905924347; Mon, 06 Jul 2009 11:45:24 -0700 (PDT) Received: from localhost.localdomain.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) by mx.google.com with ESMTPS id j34sm11616703waf.64.2009.07.06.11.45.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 06 Jul 2009 11:45:23 -0700 (PDT) To: Trevor Scroggins Cc: gcc@gcc.gnu.org Subject: Re: CONSTANT_POOL_BEFORE_FUNCTION has no effect in tm.h? References: From: Ian Lance Taylor Date: Mon, 06 Jul 2009 18:45:00 -0000 In-Reply-To: (Trevor Scroggins's message of "Mon\, 6 Jul 2009 11\:29\:39 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00119.txt.bz2 Trevor Scroggins writes: > No, that won't work. The assembler only recognizes .text, .data, and > .bss and doesn't support .section. Surely there's a simple hook that > instructs that compiler to print locals after a function instead of > before it? No. Why should there be? Even if you fix the case of string constants, you will run into trouble as soon as somebody writes const int ai[] = { 1 }; Most systems require some sort of startup code to run before main, anyhow. If you have no such requirement, then I recommend simply being disciplined in how you write the "main" function, or paying the cost of two or four initial bytes to branch to the main function from the start of the .text section. Ian