public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* error while using arm-elf-gcc
@ 2002-11-18 18:23 汪 翼
  0 siblings, 0 replies; only message in thread
From: 汪 翼 @ 2002-11-18 18:23 UTC (permalink / raw)
  To: gcc-help

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312; format=flowed, Size: 3941 bytes --]

Hi 

I built a cross compiler and compiled a toy program, but I got a error like 
this: 
/home/student/wangy/eCos-arm-elf/H-i686-pc-linux-gnu/arm-elf/bin/ld: cannot 
open crt0.o: No such file or directory 
collect2: ld returned 1 exit status 

My cross compiler was under 
/home/student/wangy/eCos-arm-elf/H-i686-pc-linux-gnu/bin, I built the cross 
compiler with the help of this document: 
http://sources.redhat.com/ecos/tools/linux-arm-elf.html 
but the versions of the components wad not what it provided, while I 
couldn't find them, I choose some upper release: 
binutils-2.13.tar gcc-g++-2.95.2.tar.bz2  gcc-core-2.95.2.tar.bz2 
insight-5.2.1.tar.bz2 
gdb-5.2.1.tar.bz2 

Someone told me that maybe it was because I haven't install the glibc(or 
newlib), but in the toy c program, I did not use any lib function! The c 
program was:  

int main()
{
        return 0;
}

In addition, in the document 
"http://sources.redhat.com/ecos/tools/linux-arm-elf.html ", the newlibc or 
glibc was not required while build the toolchain, but in the ajunct file 
which also talks about how to build a arm toolchain, the glibc was 
required.
I tried to build the glibc, I config and make the glibc with the command:
> ../glibc-2.2.4/configure --target=arm-elf 
--prefix=/homex/student/wangy/arm-elf-toolchain/arm-elf --enable-add-ons
> make 
but I got a error like:
arm-elf-gcc ../sysdeps/unix/sysv/linux/i386/sysdep.S -c  -I../include -I. 
-I/home/student/wangy/tar-files/glibc-build/csu -I.. -I../libio  
-I/home/student/wangy/tar-files/glibc-build -I../sysdeps/i386/elf 
-I../linuxthreads/sysdeps/unix/sysv/linux/i386 
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread 
-I../sysdeps/pthread -I../linuxthreads/sysdeps/unix OST 
http://sea1fd.sea1.hotmail.msn.com/cgi-b../linuxthreads/sysdeps/i386/i686 
-I../linuxthreads/sysdeps/i386/i586 -I../sysdeps/i386/i586 
-I../sysdeps/i386/i486 -I../linuxthreads/sysdeps/i386 
-I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/unix/sysv/linux/i386 
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common 
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix 
-I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 
-I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 
-I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf 
-I../sysdeps/generic   -D_LIBC_REENTRANT -include ../include/libc-symbols.h 
    -DHAVE_INITFINI -DASSEMBLER  
-I/home/student/wangy/tar-files/glibc-build/csu/. -DGAS_SYNTAX  -o 
/home/student/wangy/tar-files/glibc-build/csu/sysdep.o
../sysdeps/unix/sysv/linux/i386/sysdep.S: Assembler messages:
../sysdeps/unix/sysv/linux/i386/sysdep.S:30: Error: unrecognized symbol 
type ""
../sysdeps/unix/sysv/linux/i386/sysdep.S:50: Error: unrecognized symbol 
type ""
../sysdeps/unix/sysv/linux/i386/sysdep.S:51: Error: bad instruction `negl 
%eax'
../sysdeps/unix/i386/sysdep.S:47: Error: bad instruction `pushl %eax'
../sysdeps/unix/i386/sysdep.S:49: Error: bad instruction `call 
__errno_location'
../sysdeps/unix/i386/sysdep.S:51: Error: bad instruction `popl %ecx'
../sysdeps/unix/i386/sysdep.S:52: Error: bad instruction `movl %ecx,(%eax)'
../sysdeps/unix/i386/sysdep.S:74: Error: bad instruction `movl $-1,%eax'
../sysdeps/unix/i386/sysdep.S:75: Error: bad instruction `ret'
make[2]: *** [/home/student/wangy/tar-files/glibc-build/csu/sysdep.o] Error 
1
make[2]: Leaving directory `/home/student/wangy/tar-files/glibc-2.2.4/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/home/student/wangy/tar-files/glibc-2.2.4'
make: *** [all] Error 2


What to do now? 

Thanks for your help! 

Dam Wang 





_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer:  http://explorer.msn.com/lccn/ 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-11-19  2:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-18 18:23 error while using arm-elf-gcc 汪 翼

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).