summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-26 19:54:42 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-10-26 19:54:42 +0000
commit8cbabea53395b129807fe86713ce00ab119e7414 (patch)
tree4e1082dba15dedf1e0cf5b5116ab52cddd4e3511 /gcc/dwarf2out.c
parentb748c2b6fa3230735d9c0c570f9eb1fe506c08ac (diff)
downloadgcc-8cbabea53395b129807fe86713ce00ab119e7414.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16192 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index eebac520cac..45b60d6e11b 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. */