summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-17 06:44:15 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-17 06:44:15 +0000
commitd0a591a63bc584b2607993c73f6d9ca180c2c2e7 (patch)
treeffef96af089699b255c31094d0ce68fb469e9d9d /gcc
parent9c37a11b4d912b2798bb18487be52de438edee95 (diff)
downloadgcc-d0a591a63bc584b2607993c73f6d9ca180c2c2e7.tar.gz
* config/frv/frv.c (frv_asm_out_constructor): New.
(frv_asm_out_destructor): New. * config/frv/frv.h (CTORS_SECTION_ASM_OP): New. (DTORS_SECTION_ASM_OP): New. (ASM_OUTPUT_CONSTRUCTOR): Remove. (ASM_OUTPUT_DESTRUCTOR): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65724 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/frv/frv.c26
-rw-r--r--gcc/config/frv/frv.h26
3 files changed, 40 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5e859e6f3f9..4dfbdad9ad1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2003-04-16 Richard Henderson <rth@redhat.com>
+ * config/frv/frv.c (frv_asm_out_constructor): New.
+ (frv_asm_out_destructor): New.
+ * config/frv/frv.h (CTORS_SECTION_ASM_OP): New.
+ (DTORS_SECTION_ASM_OP): New.
+ (ASM_OUTPUT_CONSTRUCTOR): Remove.
+ (ASM_OUTPUT_DESTRUCTOR): Remove.
+
+2003-04-16 Richard Henderson <rth@redhat.com>
+
* config/cris/cris.c (cris_gotless_symbol, cris_got_symbol): Use
SYMBOL_REF_LOCAL_P; abort if not pic.
(cris_encode_section_info): Remove.
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 430d9b2682e..7c36783fdac 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -284,6 +284,8 @@ static bool frv_in_small_data_p PARAMS ((tree));
static void frv_asm_output_mi_thunk
PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
static bool frv_rtx_costs PARAMS ((rtx, int, int, int*));
+static void frv_asm_out_constructor PARAMS ((rtx, int));
+static void frv_asm_out_destructor PARAMS ((rtx, int));
/* Initialize the GCC target structure. */
#undef TARGET_ASM_FUNCTION_PROLOGUE
@@ -304,6 +306,10 @@ static bool frv_rtx_costs PARAMS ((rtx, int, int, int*));
#define TARGET_IN_SMALL_DATA_P frv_in_small_data_p
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS frv_rtx_costs
+#undef TARGET_ASM_CONSTRUCTOR
+#define TARGET_ASM_CONSTRUCTOR frv_asm_out_constructor
+#undef TARGET_ASM_DESTRUCTOR
+#define TARGET_ASM_DESTRUCTOR frv_asm_out_destructor
#undef TARGET_ASM_OUTPUT_MI_THUNK
#define TARGET_ASM_OUTPUT_MI_THUNK frv_asm_output_mi_thunk
@@ -9853,3 +9859,23 @@ frv_rtx_costs (x, code, outer_code, total)
return false;
}
}
+
+static void
+frv_asm_out_constructor (symbol, priority)
+ rtx symbol;
+ int priority ATTRIBUTE_UNUSED;
+{
+ ctors_section ();
+ assemble_align (POINTER_SIZE);
+ assemble_integer_with_op ("\t.picptr\t", symbol);
+}
+
+static void
+frv_asm_out_destructor (symbol, priority)
+ rtx symbol;
+ int priority ATTRIBUTE_UNUSED;
+{
+ dtors_section ();
+ assemble_align (POINTER_SIZE);
+ assemble_integer_with_op ("\t.picptr\t", symbol);
+}
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index 39bc1769575..4273847297c 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -2640,6 +2640,11 @@ __asm__("\n" \
#define INIT_SECTION_ASM_OP "\t.section .init,\"ax\""
#define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\""
+#undef CTORS_SECTION_ASM_OP
+#undef DTORS_SECTION_ASM_OP
+#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\""
+#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\""
+
/* A C expression whose value is a string containing the assembler operation to
switch to the fixup section that records all initialized pointers in a -fpic
program so they can be changed program startup time if the program is loaded
@@ -2860,27 +2865,6 @@ do { \
init section is not actually run automatically, but is still useful for
collecting the lists of constructors and destructors. */
#define INVOKE__main
-
-/* Output appropriate code tp call a static constructor. */
-#undef ASM_OUTPUT_CONSTRUCTOR
-#define ASM_OUTPUT_CONSTRUCTOR(STREAM,NAME) \
-do { \
- ctors_section (); \
- fprintf (STREAM, "\t.picptr\t"); \
- assemble_name (STREAM, NAME); \
- fprintf (STREAM, "\n"); \
-} while (0)
-
-/* Output appropriate code tp call a static destructor. */
-#undef ASM_OUTPUT_DESTRUCTOR
-#define ASM_OUTPUT_DESTRUCTOR(STREAM,NAME) \
-do { \
- dtors_section (); \
- fprintf (STREAM, "\t.picptr\t"); \
- assemble_name (STREAM, NAME); \
- fprintf (STREAM, "\n"); \
-} while (0)
-
/* Output of Assembler Instructions. */