This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with arm-elf-gcc cross-compiler


On Jun  3, 2003, Olivier BOLDARINO <o.boldarino@alplog.fr> wrote:

> arm-elf-gcc -mcpu=arm7tdmi valid_main.o -o valid.elf -Tvalid.ld -nostdlib 
> -L/tools/H-i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.95.3 -lgcc
> /tools/H-i686-pc-linux-gnu/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o): dans 
> la fonction `__do_global_ctors':
> __main.o(.text+0xbc): référence indéfinie vers `atexit' -A

> What's wrong?

You need newlib or some other standard C library for a definition of
atexit().  By using -nostdlib, you're telling GCC to not link in the
standard C library, so...  You get what you asked for :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]