DWARF2_UNWIND_INFO without crtstuff?

Kamil Iskra kamil@dwd.interkom.pl
Wed Oct 1 07:00:00 GMT 1997


I've got a problem on m68k-amigaos. Thanks to Andreas Schwab, dwarf2
unwind info is now supported on m68k, so GCC uses -fno-sjlj-exceptions by
default, with DWARF2 unwind info instead of inline unwinders.

The problem is, that it just doesn't seem to work for me. I get "Abort
trap" every time an exception is throw.

According to a comment in except.c:

   On targets that support crtstuff.c, the unwind information
   is stored in a section named .eh_frame and the information for the
   entire shared object or program is registered with a call to
   __register_frame.  On other targets, the information for each
   translation unit is registered separately with a static constructor.

My target does not use crtstuff.c, neither does it use ELF, init sections
and all this nice stuff. It's a plain old a.out-based target.

By checking the assembler code produced by the compiler I can see the
unwind info there, but it doesn't seem to be referenced anywhere. Contrary
to the comment above, no static constructor is emitted, so the unwind info
is not registered and the program abort()s when an exception is thrown
(that's at least my current theory).

My question is: how do I turn these static constructors on?

And another question: how can I turn the DWARF2_UNWIND_INFO off, so that
-fsjlj-exceptions (which seems to work) is the default, as it used to be?
When DWARF2_UNWIND_INFO is undefined the cc1 linking stage fails, since
m68k.c calls dwarf2 unwind support functions, which are not compiled into
dwarf2out.c. Defining DWARF2_UNWIND_INFO to 0 doesn't seem to be the right
approach either, since most often the support code is enabled with #ifdef
DWARF2_UNWIND_INFO, not with a #if.

/ Kamil Iskra - AMIGA 1200, 68030 50MHz, HDD 1.6 GB, 18 MB RAM \
| iskra@student.uci.agh.edu.pl  kiskra@ernie.icslab.agh.edu.pl |
| http://student.uci.agh.edu.pl/~iskra                         |
\ PGP public key available via Finger or WWW                   /




More information about the Gcc mailing list