information about ld invocation and defaults ?
Sun Nov 23 16:51:00 GMT 2008
Thanks Andrew, comments and further notes below,
Best Regards, Dave
At 10:49 AM 11/23/2008, Andrew Haley wrote:
>Dave Nadler wrote:
> > Hi All - I'm a newbie with GCC and having a bit of a flail with
> > rebuilding and understanding GCC interaction with LD and "configured
> > default path" in the tools.
Sorry, should have clarified, I'm building a cross-compiler using
3.4.4 on cygwin for both build environment and target
> > I'd like to see the exact parameters with which ld is invoked by GCC. I
> > added -wl,-t to the GCC line, and while this provides a lot of helpful
> > information, some info seems missing, in particular:
> > - exactly what is passed into ld as it is invoked ?
>gcc -v ...
Bingo ! Thanks, that really helps.
> > - ld cannot find "crt0.o"; OK tell me where did it look ?
>strace -f -etrace=file ld ...
C:\cygwin\bin\strace.exe: unknown option -- e
Can't ld provide this information ? Seems like it is generally helpful to
anyone trying to debug a link step ?
> > - ld cannot find "crt0.o"; OK tell me where it was given the requirement
> > to load it ?
>crt0 is the C RunTime startup. No crt, no C.
Sure, but where did it get the requirement ? In this case the gcc -v option
shows me, but for more complex link steps...
> > - what is the definition of "sysroot prefix" for this build of ld ?
>I'm not sure that this question makes any sense. The sysroot is
>usually used after binutils are built and installed, when gcc
Right, but I'd like to be clear exactly what ld is trying to do
in the case of an existing build, and again after I builld it...
>I take it you're trying to cross-compile. Have you installed
>a C library for your target?
Dave Nadler, USA East Coast voice (978) 263-0097, firstname.lastname@example.org
More information about the Gcc-help