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]

Fredrik Hederstierna <fredrik.hederstierna@xxxxxxxxxxxxxxxxxxxx> writes:

> 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".

I took a look at an ARM build I happened to have, and it looks like
there is a relocation for that symbol in the ARM.exidx section.  Looking
into the compiler and assembler, it looks like that relocation is
generated for every object file compiled with the options -fexceptions
or -funwind-tables.  The division routines in libgcc are always compiled
with -fexceptions -fnon-call-exceptions.  So that is where this is
coming from.

> If I declare this symbol myself in a file as
> char __aeabi_unwind_cpp_pr0[0];
> the binary links successfully, but I'm not sure its 100% working and correct.

As far as I can see that should not cause any problems.  The only time
it would cause trouble would be if you had a signal handler that was
invoked due to a division by zero, and that signal handler threw an

The only other approach I see here would be to edit the libgcc Makefile
to remove -fexceptions -fnon-call-exceptions, or otherwise adjust the
source code to change the way these files are compiled.


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

Add to Google