documentation for augmentations in .eh_frame?

Richard Henderson rth@redhat.com
Tue Dec 16 22:20:00 GMT 2003


On Mon, Dec 15, 2003 at 05:59:09PM -0800, David Mosberger wrote:
> Is there any documentation (other than the source-code) that describes
> the augmentations used in the .eh_frame section?

No.  I meant to do something more formal but never got around to it.
The source code block comment in dwarf2out.c: 

      /* Augmentation:
         z      Indicates that a uleb128 is present to size the
                augmentation section.
         L      Indicates the encoding (and thus presence) of
                an LSDA pointer in the FDE augmentation.
         R      Indicates a non-default pointer encoding for
                FDE code pointers.
         P      Indicates the presence of an encoding + language
                personality routine in the CIE augmentation.  */

should be mostly clear.  As for the encodings themselves, the bits
are defined at the end of dwarf2.h.  Again the meanings should be
moderately self-explanitory, especially if combined with the code
in unwind-pe.h that decodes them.

> A related question: it appears to me that the "text base" (tbase) in
> the DWARF2 unwinder could only ever be non-zero if
> __register_frame_info() gets called (which, I believe won't be the
> case on "modern" systems).  Is this correct?

No.  See _Unwind_IteratePhdrCallback in unwind-dw2-fde-glibc.c.
There is currently target-specific code in there to get dbase
set for i386.  If tbase is ever needed for a different port then
we'll add a similar bits for that.  Indeed, there is a port within
Red Hat that might start using tbase with SEGREL type relocs.


r~



More information about the Gcc mailing list