[uClibc]"undefined reference __gccmain" problem fixed, but.....

Eric uc9394 at hotmail.com
Thu Jun 26 07:12:23 UTC 2003


Dear all,

I've just fixed the error message "undefined reference __gccmain" problem by
adding '/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a'. However, there is a
new problem arrived. Here is the error message:

arm-elf-ld -nostdlib -T ld.dsc24.ForUpGrade.script  rrload_base.o
sdram_dsc24.o ether_cs8900.o flash_toshiba.o io_dsc21.o osd_dsc24.o  -o
rrload.ForUpGrade '/usr/local/arm-elf/lib/libc.a'
'/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o): In function
`__do_global_ctors':
__main.o(.text+0xbc): undefined reference to `atexit'
__main.o(.text+0xc4): undefined reference to `__CTOR_LIST__'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/libgcc.a(__main.o)(.data+0x0):
undefined reference to `__DTOR_LIST__'

I've browsed some newsgroup and somebody said the libc.a missing. Somebody
also suggest adding -nostdlib option to the linker. But I've tried all those
and they don't work. I am currently using arm-elf-20030314 downloaded from
uclinux website and I'm trying to build a bootloader. Does anyone can help
me?

Best Regards,
Eric


More information about the uClibc mailing list