This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
This is done with a linker script file. Refer to the linker documentation ( http://www.objsw.com/docs/ld_toc.html ) for information on linker scripts. The script is introduced on the gcc command line with the '-T' option, for example ppc-elf-gcc myprog.c -o myprog -T myscript.ld where 'myscript.ld' is your linker script file. In order to make it work without using '-T xxx', you need to modify the 'specs' file to tell gcc to use the script file automatically. See the source code to 'gcc.c' for documentation on how the specs file works. Jyrki O Saarinen wrote: > How do I tell my cross-egcs (ppc-elf target running on linux/x86 host) > what to do in the linking stage? Normally I do: > > ppc-elf-gcc -c *.c > ppc-elf-ld -r /ppc-elf/lib/c_ppc.o *.o /ppc-elf/lib/libmoto.a > /ppc-elf/lib/c_end.o /ppc-elf/lib/scppc.a > > I would like that it ppc-elf-gcc would link like that when I compile with > ppc-elf-gcc myprog.c -o myprog. > > c_ppc.o is the startup code, libmoto.a is the Motorola math library (what > is the newest by the way?), c_end.o is the end code and scppc.a is the > ANSI C (+ additional math) library. > > ________________________________________________ > To get help for the crossgcc list, send mail to > crossgcc-request@cygnus.com with the text 'help' > (without the quotes) in the body of the message. ________________________________________________ To get help for the crossgcc list, send mail to crossgcc-request@cygnus.com with the text 'help' (without the quotes) in the body of the message.