Exceptions with dwarf2 unwind

Jeffrey A Law law@cygnus.com
Wed Apr 22 23:04:00 GMT 1998


  In message < 3521B963898BD111AA6A006008A84516079BBA@SERVER >you write:
  > 
  > Can someone explain a little how the exceptions with dwarf2
  > unwind work?
Not I :-)  It's all black magic to me :-)

  > Do most targets use the crtbegin/crtend? Or do they use collect2?
Many use the crt* files.  All ports actually use collect2, though it
may be a nop in some cases :-)

  > After loading the object, I call __register_frame(__EH_FRAME_BEGIN__).
You might want to look at the contents of the EH tables to make sure
you've got all the expected tables that that they're properly sorted.

  > I'm using binutils 980418 configured as mips-wrs-vxworks (which
  > is really mips-gnu-elf).
I'm not sure if anyone is using dwarf2 unwind EH on mips ports
yet.  Anyone want to chime in with a definitive answer?

  > 1: Are all of the files in libgcc meant to be compiled with
  > exceptions enabled?
Yes.  Though it's not strictly necessary for all of them.

  > 2: Is linking crtbegin.o and crtend.o like this the way to go?
  > (and how would you do that automatically in the specs file)
Normally all this stuff is handled at the configure/target file
level -- it takes care of building them and setting up the proper
specs files.

You might want to look at the solaris and linux ports to see how
this works.

  > 3: How does one make a multilib'd version of crtbegin.o and crtend.o?
  > I need them made for both big & little endian.
I suspect this will happen automatically if you set up a configuration
which uses the crt files.

jeff



More information about the Gcc mailing list