information about ld invocation and defaults ?
Mon Nov 24 07:24:00 GMT 2008
At 04:11 PM 11/23/2008, Brian Dessent wrote:
>Dave Nadler wrote:
> > 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 ?
>You can use -Wl,--verbose.
I'll try that, Thanks !
> > Sure, but where did it get the requirement ? In this case the gcc -v option
> > shows me, but for more complex link steps...
>crt0.o comes from the libc, so if it is not being found then your C
>library is not installed properly. "properly" means that it should be
>in $sysroot/lib if you configured gcc with a sysroot, otherwise
>$prefix/$target/lib. If you want to see where gcc thinks a file is
>supposed to be located, you can use "gcc -print-file-name=crt0.o".
I know the details of crt0 (too well), but I'm struggling a bit
with the cross-compile. The GGC I built is not looking
where I expect; hence the question. The -v option on GCC
really helps here, but its not the whole story... I read:
but I didn't quite follow the sysroot bit, Thanks !
> > 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...
>For these kind of things it's not about linker behavior. gcc is the
>component that knows where things like crt0.o are supposed to be
>located, and passes the corresponding search directories to the linker.
>So if it's not found, that means either the file isn't in the right
>place or gcc wasn't configured to know the right place.
Exactly; I'm trying to understand how I have managed to
improperly configure GCC...
Thanks for the help !
Best Regards, Dave
Dave Nadler, USA East Coast voice (978) 263-0097, email@example.com
More information about the Gcc-help