This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Joel wrote: > > With respects to Kai (please correct any glaring errors) > > Comments > 1. When building on unix system using rm_rom.ld you should not need or add any libraries > (to the ld command line) as they are included by the GROUP command. (see the way ll does > without) ---------------- clip --------------- STARTUP(rm_crt0.o) OUTPUT_ARCH(m68k) SEARCH_DIR(.) /* INPUT(vectors.o) */ /* GROUP(-ltrgt -lrom -lc -lgcc) */ GROUP(-lbcc -lc -lgcc -lm) ---------------- clip --------------- This is one thing which I once wondered... Experimenting with it showed that the linker first takes the 'crt0.o' (here 'rm_crt0.o'), then scans the libs mentioned in the GROUP, searching for the undefined symbols in 'crt0.o', then takes the compiled object and at last scans the libs mentioned in 'specs'... Here is the output from a link using the '-verbose' option (one option more easily seen using '--help' with 'ld'...) : ----------------------- clip ---------------------------------------------------- e:\usr\local\samples>gcc-m68k-coff -Os -Wl,-verbose -o tst_m68k-coff.gx tprintf.c GNU ld version 2.9.1 (with BFD 2.9.1) Supported emulations: m68kcoff attempt to open crt0.o failed attempt to open .\crt0.o failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\crt0.o failed attempt to open e:\usr\local\lib\gcc-lib\crt0.o failed attempt to open \usr\local\lib\gcc-lib\m68k-coff\2_95.2\crt0.o failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\ lib\crt0.o succeeded crt0.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\crt0 .o) <------------ Startup linked... attempt to open .\libbcc.a failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libbcc.a failed attempt to open e:\usr\local\lib\gcc-lib\libbcc.a failed attempt to open \usr\local\lib\gcc-lib\m68k-coff\2_95.2\libbcc.a failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\ lib\libbcc.a succeeded attempt to open .\libc.a failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libc.a failed attempt to open e:\usr\local\lib\gcc-lib\libc.a failed attempt to open \usr\local\lib\gcc-lib\m68k-coff\2_95.2\libc.a failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\ lib\libc.a succeeded (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)atex it.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)exit .o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)impu re.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)mall oc.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)mall ocr.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)free r.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)sbrk r.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libc.a)mloc k.o attempt to open .\libgcc.a failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libgcc.a succeeded (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libbcc.a)cp u32bug.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\..\..\..\..\m68k-coff\lib\libbcc.a)sb rk.o <--------------- All found undefined symbols in 'crt0.o' resolved... attempt to open D:\temp\ccaQaaaa.o succeeded D:\temp\ccaQaaaa.o <-------------- The compiled object is linked.... attempt to open .\libgcc.a failed attempt to open e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libgcc.a succeeded (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libgcc.a)__main.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libgcc.a)_double.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libgcc.a)_ctors.o (e:\usr\local\lib\gcc-lib\m68k-coff\2_95.2\libgcc.a)_floatex.o (Searching for the undefined symbols in the compiled object...) ----------------------- clip ---------------------------------------------------- This says that the GROUP in the linker script is quite vain and having the '-lbcc -lc -lgcc -lm' in the 'specs' would be enough... Is this a bug or a feature? Mark, please try the '-verbose' in your 'ld' line or the '-Wl,-verbose' in your GCC command line to see how your linkers work... Perhaps the Windows-one is patched somehow. Cheers, Kai ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |