On 16.03.2011 09:41, Sebastian Huber wrote:
On 03/14/2011 03:14 PM, Andrew Haley wrote:
On 03/14/2011 12:02 PM, Sebastian Huber wrote:
Hello,
the object file bpabi.o is part of libgcc. It is compiled with the option
-fexceptions. Does anyone know why we need exceptions here?
__divdi3 can throw an exception. I don't know whether it does on ARM,
but it does on other processors.
Andrew.
Thanks for the hint. How can an assembler or C function throw an exception? I
am absolutely not sure how this low-level stuff works in detail, but it seems
to me from a look at libgcc/Makefile.in that this -fexceptions is used for all
targets? I currently try to prepare a RTEMS GCC for ARM to use the ARM EABI
version 5. Now I have the problem that an innocent looking
int64_t f(int64_t a, int64_t b)
{
return a / b;
}
will pull in the hole unwind mechanic that accounts for 10kByte of Thumb code.
This might be a problem for small target systems.
http://svn.rockbox.org/viewvc.cgi/www/gcc/rockbox-multilibs-noexceptions-arm-elf-eabi-gcc-4.4.2_1.diff?view=log
has a patch to gcc to disable this exception/unwind code.
Best regards.