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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 03/28/2012 11:33 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.

Sorry I don't fully agree, we don't want the unwinding stuff.
We are very short on flash memory, and we do not want to waste bytes on unnecessary code.

Also, why does it work with 'arm-none-elf', shouldn't it be the same regarding __div0?
The correct solution would be to exclude dependency to unwind from _divdi3 when building a bare metal toolchain.

For me it is also unclear why we need this division by zero exception in the bare metal tool chain. See also:

http://gcc.gnu.org/ml/gcc-help/2011-03/msg00149.html

--
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber@xxxxxxxxxxxxxxxxxx
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


[Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

Add to Google