aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>2003-09-29 22:07:39 +0000
committerRainer Orth <ro@gcc.gnu.org>2003-09-29 22:07:39 +0000
commit9d340419285814de51cced9ad39d682c0037167f (patch)
tree60a0220083007bd188f5ad527ba761e6c87ea827 /gcc
parentbc800bb24754583687623be67c348523ca78731a (diff)
downloadgcc-9d340419285814de51cced9ad39d682c0037167f.zip
gcc-9d340419285814de51cced9ad39d682c0037167f.tar.gz
gcc-9d340419285814de51cced9ad39d682c0037167f.tar.bz2
dwarf2out.c (default_eh_frame_section): Split into ...
* dwarf2out.c (default_eh_frame_section): Split into ... (named_section_eh_frame_section, collect2_eh_frame_section): ... new functions. * output.h (named_section_eh_frame_section): Declare. (collect2_eh_frame_section): Likewise. From-SVN: r71920
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/dwarf2out.c26
-rw-r--r--gcc/output.h2
3 files changed, 31 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1730a5f6..2b6facf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2003-09-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * dwarf2out.c (default_eh_frame_section): Split into ...
+ (named_section_eh_frame_section, collect2_eh_frame_section): ... new
+ functions.
+ * output.h (named_section_eh_frame_section): Declare.
+ (collect2_eh_frame_section): Likewise.
+
2003-09-29 Zack Weinberg <zack@codesourcery.com>
* real.c (real_sqrt): Use get_canonical_qnan directly.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6ff9079..f22ca50 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -110,12 +110,12 @@ dwarf2out_do_frame (void)
#define PTR_SIZE (POINTER_SIZE / BITS_PER_UNIT)
#endif
-/* Default version of targetm.eh_frame_section. Note this must appear
- outside the DWARF2_DEBUGGING_INFO || DWARF2_UNWIND_INFO macro
- guards. */
+/* Various versions of targetm.eh_frame_section. Note these must appear
+ outside the DWARF2_DEBUGGING_INFO || DWARF2_UNWIND_INFO macro guards. */
+/* Version of targetm.eh_frame_section for systems with named sections. */
void
-default_eh_frame_section (void)
+named_section_eh_frame_section (void)
{
#ifdef EH_FRAME_SECTION_NAME
#ifdef HAVE_LD_RO_RW_SECTION_MIXING
@@ -136,13 +136,29 @@ default_eh_frame_section (void)
#else
named_section_flags (EH_FRAME_SECTION_NAME, SECTION_WRITE);
#endif
-#else
+#endif
+}
+
+/* Version of targetm.eh_frame_section for systems using collect2. */
+void
+collect2_eh_frame_section (void)
+{
tree label = get_file_function_name ('F');
data_section ();
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
(*targetm.asm_out.globalize_label) (asm_out_file, IDENTIFIER_POINTER (label));
ASM_OUTPUT_LABEL (asm_out_file, IDENTIFIER_POINTER (label));
+}
+
+/* Default version of targetm.eh_frame_section. */
+void
+default_eh_frame_section (void)
+{
+#ifdef EH_FRAME_SECTION_NAME
+ named_section_eh_frame_section ();
+#else
+ collect2_eh_frame_section ();
#endif
}
diff --git a/gcc/output.h b/gcc/output.h
index a2b48e7..c4fdc53 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -447,6 +447,8 @@ extern void default_function_pro_epilogue (FILE *, HOST_WIDE_INT);
extern void default_exception_section (void);
/* Tell assembler to switch to the section for the EH frames. */
+extern void named_section_eh_frame_section (void);
+extern void collect2_eh_frame_section (void);
extern void default_eh_frame_section (void);
/* Default target hook that outputs nothing to a stream. */