public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Etienne Lorrain <etienne_lorrain@yahoo.fr>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: gcc@gcc.gnu.org
Subject: Re: GCC-4.0.2 20050811: should GCC consider inlining functions in between different sections?
Date: Fri, 12 Aug 2005 12:06:00 -0000	[thread overview]
Message-ID: <20050812120551.89295.qmail@web26902.mail.ukl.yahoo.com> (raw)
In-Reply-To: <84fc9c0005081204071177b70e@mail.gmail.com>

--- Richard Guenther <richard.guenther@gmail.com> 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

  reply	other threads:[~2005-08-12 12:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 10:40 Etienne Lorrain
2005-08-12 11:07 ` Richard Guenther
2005-08-12 12:06   ` Etienne Lorrain [this message]
2005-08-12 17:10     ` Mike Stump
2005-08-12 17:27       ` Jan Hubicka
2005-08-16  8:15     ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050812120551.89295.qmail@web26902.mail.ukl.yahoo.com \
    --to=etienne_lorrain@yahoo.fr \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).