This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: Linker and Startup files.
- To: crossgcc@cygnus.com
- Subject: Re: Linker and Startup files.
- From: "Kai Ruottu" <karuottu@freenet.hut.fi>
- Date: Fri, 7 May 1999 10:48:26 +0000
- Comments: Authenticated sender is <karuottu@mail.freenet.hut.fi>
- Organization: Freenet Finland
- Reply-To: crossgcc@cygnus.com
Brendan Simon wrote:
> I've finally got to build and egcs cross-compiler (powerpc-eabi). I
> then built new lib with the exact same configure options
> (--target=powerpc-eabi --prefix=/usr/local/egcs --with-newlib amongst
> others). It built and installed OK but gcc/g++ can not create
> executables.
The default startfile, endfile, link_spec, libraries etc. are empty in
the specs file for ppc-eabi. I have copied the specs for the 'psim' target
for my 'default' target :
*lib_default:
--start-group -lsim -lc --end-group
*startfile_default:
ecrti.o%s sim-crt0.o%s
*endfile_default:
ecrtn.o%s
*link_start_default:
-Ttext 0x10000074
So a created executable will run as the default in the PowerPC simulator,
included with GDB.
> Do I HAVE to provide my own startup file and linker script or should
> newlib have a defaults ?
There are the 'ads', 'yellowknife', 'mvme', 'sim', 'linux' and 'solaris'
'Board Support Packages' included with newlib. If you haven't yet any of
these supported 'hard' target boards, I recommend building GDB for the
powerpc-eabi target too, and doing some tests with the psim, the 'sim' target
first.
For documents (HTML-format manual set) about the 'psim', please look at:
http:/sourceware.cygnus.com (About things related to gdb)
> If I have to provide them, is there templates for particular targets ?
> I have some RTEMS ones which I could use but I guess I'd rather use
> newlib (or should that be libgloss) ones.
The mentioned BSPs can serve as templates for your own target... The
support sources are in 'libgloss/powerpc' (or 'libgloss/rs6000').
Cheers, Kai
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.