From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7942 invoked by alias); 12 Aug 2005 12:06:21 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 7536 invoked by uid 22791); 12 Aug 2005 12:05:59 -0000 Received: from web26902.mail.ukl.yahoo.com (HELO web26902.mail.ukl.yahoo.com) (217.146.176.91) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Fri, 12 Aug 2005 12:05:59 +0000 Received: (qmail 89297 invoked by uid 60001); 12 Aug 2005 12:05:51 -0000 Message-ID: <20050812120551.89295.qmail@web26902.mail.ukl.yahoo.com> Received: from [62.253.198.200] by web26902.mail.ukl.yahoo.com via HTTP; Fri, 12 Aug 2005 14:05:51 CEST Date: Fri, 12 Aug 2005 12:06:00 -0000 From: Etienne Lorrain Subject: Re: GCC-4.0.2 20050811: should GCC consider inlining functions in between different sections? To: Richard Guenther Cc: gcc@gcc.gnu.org In-Reply-To: <84fc9c0005081204071177b70e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2005-08/txt/msg00336.txt.bz2 --- Richard Guenther wrote: > Please explain the problem you're seeing. I can see nothing wrong with > inlining functions within different sections in general. If you're > trying to do things behind the compilers back, though, be prepared to > change workarounds with compiler versions. For my project, i.e. Gujin on sourceforge, I am putting some sections in one place, some other in another place, and the relation in between sections has to be tightly controlled. For instance in Gujin, section names decides on which i386 code segment the code will be put - so that if you want to reference some symbols in another code section you have to do the equivalent of a far code instead of a near call. I have added a command to the linker file to forbid reference from one section to another: NOCROSSREFS (.text .xcode); so that I can catch the unexpected use at link time. The inter-segment references have to be in some special sections - using some out-of-line functions. Inlining those special functions makes a symbol reference from a section name appear in another - in this special case my software would still work when the "NOCROSSREFS (.text .xcode);" is commented out. The question is in fact: what is a section for GCC? Is it just a way to group functions together to improve memory cache efficiency; or is the GCC user authorised to use sections to forbid access to some functions at link time? Is there a third use of sections I am not aware of? (excluding function sections for LD garbage collection of section, which is quite an orthogonal problem). Thanks for information, Etienne. ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com