diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1997-10-26 19:54:42 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1997-10-26 14:54:42 -0500 |
commit | d84e64d416af881a3dbc9eed8dd0212cc473baf8 (patch) | |
tree | 4e1082dba15dedf1e0cf5b5116ab52cddd4e3511 /gcc/dwarf2out.c | |
parent | bd123dc9f223f452d5dd6937dd6076d762bca564 (diff) | |
download | gcc-d84e64d416af881a3dbc9eed8dd0212cc473baf8.zip gcc-d84e64d416af881a3dbc9eed8dd0212cc473baf8.tar.gz gcc-d84e64d416af881a3dbc9eed8dd0212cc473baf8.tar.bz2 |
dwarf2out.c (output_call_frame_info): The CIE pointer is now a 32 bit PC-relative offset.
* dwarf2out.c (output_call_frame_info): The CIE pointer is now a 32
bit PC-relative offset. The exception range table pointer is now in
the CIE.
* frame.c (dwarf_cie, dwarf_fde): Rename CIE_pointer to CIE_delta.
(count_fdes, add_fdes, get_cie): Adjust.
(cie_info, extract_cie_info, __frame_state_for): Adjust eh_ptr uses.
From H.J. Lu:
* frame.c (count_fdes, add_fdes): Skip linked once FDE entries.
From-SVN: r16192
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index eebac52..45b60d6 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1532,12 +1532,18 @@ output_call_frame_info (for_eh) fputc ('\n', asm_out_file); ASM_OUTPUT_LABEL (asm_out_file, l1); - ASM_OUTPUT_DWARF_DATA4 (asm_out_file, DW_CIE_ID); + if (for_eh) + /* Now that the CIE pointer is PC-relative for EH, + use 0 to identify the CIE. */ + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0); + else + ASM_OUTPUT_DWARF_DATA4 (asm_out_file, DW_CIE_ID); + if (flag_debug_asm) fprintf (asm_out_file, "\t%s CIE Identifier Tag", ASM_COMMENT_START); fputc ('\n', asm_out_file); - if (for_eh ? PTR_SIZE == 8 : DWARF_OFFSET_SIZE == 8) + if (! for_eh && DWARF_OFFSET_SIZE == 8) { ASM_OUTPUT_DWARF_DATA4 (asm_out_file, DW_CIE_ID); fputc ('\n', asm_out_file); @@ -1550,11 +1556,19 @@ output_call_frame_info (for_eh) fputc ('\n', asm_out_file); if (eh_ptr) { - /* The FDE contains a pointer - to the exception region info for the frame. */ - ASM_OUTPUT_DWARF_STRING (asm_out_file, "e"); + /* The CIE contains a pointer to the exception region info for the + frame. Make the augmentation string three bytes (including the + trailing null) so the pointer is 4-byte aligned. The Solaris ld + can't handle unaligned relocs. */ + ASM_OUTPUT_DWARF_STRING (asm_out_file, "eh"); if (flag_debug_asm) fprintf (asm_out_file, "\t%s CIE Augmentation", ASM_COMMENT_START); + fputc ('\n', asm_out_file); + + ASM_OUTPUT_DWARF_ADDR (asm_out_file, "__EXCEPTION_TABLE__"); + if (flag_debug_asm) + fprintf (asm_out_file, "\t%s pointer to exception region info", + ASM_COMMENT_START); } else { @@ -1605,7 +1619,7 @@ output_call_frame_info (for_eh) ASM_OUTPUT_LABEL (asm_out_file, l1); if (for_eh) - ASM_OUTPUT_DWARF_ADDR (asm_out_file, "__FRAME_BEGIN__"); + ASM_OUTPUT_DWARF_DELTA (asm_out_file, ".", "__FRAME_BEGIN__"); else ASM_OUTPUT_DWARF_OFFSET (asm_out_file, stripattributes (FRAME_SECTION)); if (flag_debug_asm) @@ -1623,16 +1637,6 @@ output_call_frame_info (for_eh) fprintf (asm_out_file, "\t%s FDE address range", ASM_COMMENT_START); fputc ('\n', asm_out_file); - if (eh_ptr) - { - /* For now, a pointer to the translation unit's info will do. - ??? Eventually this should point to the function's info. */ - ASM_OUTPUT_DWARF_ADDR (asm_out_file, "__EXCEPTION_TABLE__"); - if (flag_debug_asm) - fprintf (asm_out_file, "\t%s pointer to exception region info", - ASM_COMMENT_START); - fputc ('\n', asm_out_file); - } /* Loop through the Call Frame Instructions associated with this FDE. */ |