This is the mail archive of the
mailing list for the crossgcc project.
Re: *** Floating Point Unavailable ***
C. M. Heard/VVNET, Inc. wrote:
> On Thu, 1 Jul 1999, Scott Howard wrote:
> > C. M. Heard/VVNET, Inc. wrote:
> [ ... ]
> > > With older versions (2.7.2 et. seq) of gcc it was possible (at least when
> > > using gnu-ld) to organize things any way you wanted by writing a linker
> > > directive file to replace the one that gcc uses by default. Granted, most
> > > of my experience is with MIPS, but I recall doing similar stuff with ppc
> > > about two years ago. Is this not still possible?
> > On the PowerPC port there are a several files which are automatically
> > linked in, for startup support and also for ELF constructor/destructor
> > support. This stuff gets put on the linker command line, so the linker
> > script file can't prevent these files from being included into the final
> > program.
> > Most of this is done in the 'specs' file, so strictly speaking this
> > behaviour could be changed just by editing the specs file. However, I
> > don't believe changing the specs file would be a good idea, since it
> > will change the compiler's 'default' behaviour; the simplest solution is
> > to add a couple of assembly instructions to the application program.
> If you use gcc is only used to compile and use gnu ld to link things then
> a user-suppled linker command file will override the system default. From
> the gnu ld info file:
> `-T COMMANDFILE'
> Read link commands from the file COMMANDFILE. These commands
> replace `ld''s default link script (rather than adding to it), so
> COMMANDFILE must specify everything necessary to describe the
> target format. *Note Commands::. If COMMANDFILE does not exist,
> `ld' looks for it in the directories specified by any preceding
> `-L' options. Multiple `-T' options accumulate.
> Of course, if you go this route you will want to carefully study what
> the default command files normally included by gcc do, so that you
> can include the appropriate parts in your own command file.
> If all you need is a couple of assembler instructions then adding them
> in-line in main() probably is simpler. Sometimes one wishes to do more,
> however, in which case replacing the default crt0.S is better choice.
> That's easy, once you've gone to the trouble of figuring out how to
> write command files for the linker [which admittedly is a bit of work].
You are correct of course. I normally use 'gcc' to link, since it does a
lot of the tedious work for me including multilibbing, startup code, C++
support etc. But as you point out, if you really do need something that
the default setup can't handle, then calling ld directly will let you
specify everything in fine detail.
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
To remove yourself from the crossgcc list, send
mail to email@example.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.