[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
[arm-gnu] Some problems with undefined reference to `__aeabi_unwind_cpp_*'
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: [arm-gnu] Some problems with undefined reference to `__aeabi_unwind_cpp_*'
- From: Julien Iguchi-Cartigny <kartoch@xxxxxxxxx>
- Date: Fri, 29 Jan 2010 14:43:51 +0100
Hi,
I'm trying to build a binary image for an AT91 board. Starting with a
simple program without dependencies, I had error messages concerning
__aeabi_unwind_cpp_pr1 and __aeabi_unwind_cpp_pr0. Following the
information found in this document [1], I understand than these
symbols refer to a mechanism for managing exceptions in C++, which
create a new section in my elf binary:
5 .ARM.attributes 00000020 00000000 00000000 000000e5 2**0
CONTENTS, READONLY
As I just want to build C program, i use the following options to get
rid of these errors:
-fno-exceptions
-fno-unwind-tables
-fno-asynchronous-unwind-tables
But I now I want to link my program with the libc. Thus it seems I
need to have the ARM section, as all the objects in the libc refer to
these symbols. I've tried several ways:
1> removing the the -fno-* flags when compiling
2> adding path to libc and libgcc:
-L/home/kartoch/works/embedded/tools/arm-2009q3/arm-none-linux-gnueabi/libc/armv4t/usr/lib
-L/home/kartoch/works/embedded/tools/arm-2009q3/lib/gcc/arm-none-linux-gnueabi/4.4.1/armv4t
-lgcc -lc -lgcc -lc -lgcc
But the errors are still here:
arm-none-linux-gnueabi-ld -o
samples/example_terminal_eb40a/build/at91-debug-ice/term -EL -static
-T/home/kartoch/works/embedded/at91-eb40a/targets/at91/targets/sram_ice_eb40a.ld
samples/example_terminal_eb40a/build/at91-debug-ice/cstartup.o
samples/example_terminal_eb40a/build/at91-debug-ice/term.o
samples/example_terminal_eb40a/build/at91-debug-ice/terminal_irq.o
targets/at91/build/at91-debug-ice/drivers/lib_drv/libdrv.a
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a
-L/home/kartoch/works/embedded/tools/arm-2009q3/arm-none-linux-gnueabi/libc/armv4t/usr/lib
-L/home/kartoch/works/embedded/tools/arm-2009q3/lib/gcc/arm-none-linux-gnueabi/4.4.1/armv4t
-lgcc -lc -lgcc -lc -lgcc
samples/example_terminal_eb40a/build/at91-debug-ice/term.o:(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
targets/at91/build/at91-debug-ice/drivers/lib_drv/libdrv.a(terminal.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr0'
targets/at91/build/at91-debug-ice/drivers/lib_drv/libdrv.a(terminal.o):(.ARM.exidx+0x8):
undefined reference to `__aeabi_unwind_cpp_pr1'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_aic.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_aic.o):(.ARM.exidx+0x10):
undefined reference to `__aeabi_unwind_cpp_pr0'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_err.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr0'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_usart.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_usart.o):(.ARM.exidx+0x10):
undefined reference to `__aeabi_unwind_cpp_pr0'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_ps40008.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr1'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_ps40008.o):(.ARM.exidx+0x8):
undefined reference to `__aeabi_unwind_cpp_pr0'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_pio.o):(.ARM.exidx+0x0):
undefined reference to `__aeabi_unwind_cpp_pr0'
targets/at91/build/at91-debug-ice/parts/r40008/libr40008.a(lib_pio.o):(.ARM.exidx+0x18):
undefined reference to `__aeabi_unwind_cpp_pr1'
scons: *** [samples/example_terminal_eb40a/build/at91-debug-ice/term] Error 1
Does anyone has an idea about it ?
Cheers,
Julien.
PS: i saw in this forum a solution about using gcc for compiling and
building in one pass. But i'm using a building software which want
that both operations need to be separate.
[1]: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
--
"Trouble-a-cat limited"
|