This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: problem with arm-elf-gcc cross-compiler
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Olivier BOLDARINO <o dot boldarino at alplog dot fr>
- Cc: "gcc-mailing-list" <gcc-help at gcc dot gnu dot org>
- Date: 03 Jun 2003 17:04:04 -0300
- Subject: Re: problem with arm-elf-gcc cross-compiler
- Organization: GCC Team, Red Hat
- References: <200306031515.58618.o.boldarino@alplog.fr>
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