This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc ld error
- From: Ian Lance Taylor <iant at google dot com>
- To: daniel tian <daniel dot xntian at gmail dot com>
- Cc: gcc at gcc dot gnu dot org, peng dot zheng at mavrixtech dot com
- Date: Wed, 21 Oct 2009 08:56:16 -0700
- Subject: Re: gcc ld error
- References: <121fadb80910210845o72c0ebe0v674d1245f40f0dc5@mail.gmail.com>
daniel tian <daniel.xntian@gmail.com> writes:
> I just wanna get the argment passed to ld, when I could debug the
> ld with gdb.
> I run the command the
> rice-elf-gcc helloworld.c -v
> But I couldn't get the parameter passed to ld.
> and I don't know what the relationship between "collect2" and
> "ld". It seems they do have some connections between them.
collect2 invokes ld with the same options (with a couple of
unimportant exceptions) that were passed to collect2.
To see precisely what collect2 does:
rice-elf-gcc -v -Wl,-debug helloworld.c
(The -debug option is one of the exceptions: collect2 does not pass it
on to ld.)
Ian