This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DWARF2_UNWIND_INFO without crtstuff?


On 7 Oct 1997, Jason Merrill wrote:

> > 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 question is: how do I turn these static constructors on?
> The collect2 program notices the unwind tables and registers them.

I had a look at the code and it seems that not all the possible cases are
covered.

collect2 will only notice the unwind tables when do_collecting is !0,
which is only the case when not using GNU ld. This means, that for example
all the a.out targets that use GNU ld should be affected (it is a mistery
for me why nobody else complained so far?).

I think I'll try to add code emitting a per-file static constructor, which
will register the unwind info. When using collect2 with do_collecting==0,
or not using collect2 at all (like in gcc2), the static constructors will
register the unwind info; otherwise, the constructor stubs will be ignored
and collect2 will take care of things. Or am I missing something?

/ 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                   /



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]