--- Richard Guenther <[EMAIL PROTECTED]> 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