FW: Searching for lib...

Kai Ruottu kai.ruottu@luukku.com
Wed Feb 28 07:33:00 GMT 2001

Kai Ruottu wrote:
> 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)
>  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'...) :

 It seems that the simple logic about the linker script name being needed first in the
'ld' command line because it defines the startup, the libs etc. was wrong all the time
in my 'specs'... Changing the related lines in 'specs' into:

----------------------------------- clip -----------------------------------------
-T bcc.ld%s





----------------------------------- clip -----------------------------------------

enabled the things in 'bcc.ld' to work probably just as originally planned....

> 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?

 This seemed to be a bug in my thinking when considering where the linker script
name should be put... The '*link:' seemed to be too obvious and therefore a wrong

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

More information about the crossgcc mailing list