2011年3月20日 星期日

Some build error while building eembc

undefined reference to `__aeabi_uldivmod'

-lgcc
libgcc.a(_divdi3.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
-lgcc_eh


Use
find /toolchain/ -name "*.a" | xargs arm-linux-objdump -x > log

then, find the symbo in log, if found, get which .a contains it.

and note the order of object sources (-l<archive> and .o/.a files), the symbol needed will only be found in following order sources, unless -( is added.
Re: [arm-gnu] GCC library linker problems

http://www.codesourcery.com/archives/arm-gnu/msg01087.html

arm-linux-ld: warning: cannot find entry symbol _start; defaulting to 00008bb0
ld warning cannot find entry symbol _start defaulting to
http://www.linuxforums.org/forum/programming-scripting/154614-ld-warning-cannot-find-entry-symbol-_start-defaulting.html
I googled about this error message and found I would need to pass /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtn.o for runtime support.


Re: cannot find entry symbol _start; defaulting to 01800074
http://www.cygwin.com/ml/crossgcc/2001-04/msg00207.html
Try to compile your "hello" porogram using:
$ powerpc-eabi-gcc -g -mads --verbose -o hello.elf hello.c


At last, all above issue is fixed by using arm-linux-gcc instead of arm-linux-ld.

沒有留言: