Bare metal ARM Cross compiler for arm-none-eabi target without libunwind?

Andrew Haley aph@redhat.com
Wed Mar 28 07:51:00 GMT 2012


On 03/28/2012 08:09 AM, Fredrik Hederstierna wrote:

> We generate the map-file, the content tells that (if I understand correctly)
> 
> "_divdi3.o"  use "__aeabi_unwind_cpp_pr0" which resides in "unwind-arm.o".
> 
> Is it really correct that we need unwind-support if just using division?
> Could it be that _divdi3 can 'throw' division-by-zero 'exception' ?
> (We have overloaded div0: "void __div0(void) { assert(0); }" so we dont want unwinding here anyway...)

I suspect (but you'll have to check) that this is because _divdi3 is
compiled with exceptions, and this is indeed because division by zero
might throw.  The simplest fix is to compile it without exceptions.
The correct fix is to make unwinding work on your platform.

Andrew.



More information about the Gcc-help mailing list