This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: ld: target not found collect2: ld returned 1 exit status
- From: Kai Ruottu <kai dot ruottu at wippies dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 05 May 2011 10:29:10 +0300
- Subject: Re: ld: target not found collect2: ld returned 1 exit status
- References: <BANLkTi=Ny9yncpxeo84S8CW0s-pCUQRhig@mail.gmail.com>
5.5.2011 8:52, naga raj kirjoitti:
I have ported Gcc-4.6.0 to a embedded target.
Who then ported GNU binutils for this target? And why
you haven't discussed with this person about which
target options would be used and for what purposes?
For big endian( I made big-endian as default) it is working fine.
But when I use -mlittle-endian flag, in compiler it is generating
error as ld: target not found collect2: ld returned 1 exit status.
I would assume your GCC to give some option to the
target 'ld' which it doesn't grok...
So in my attempts I have used -c -mlittle-endian flags in compilation
ex: zz-gcc -c -mlittle-endian abc.c
and I linked manually with -EL option then it is working fine.
ex: zz-ld -N -EL abc.o
What options your GCC is giving to the linker when you
see them via? :
zz-gcc -v -mlittle-endian -o abc.x abc.c