summaryrefslogtreecommitdiff
path: root/gcc/config/frv
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/frv')
-rw-r--r--gcc/config/frv/frv-protos.h5
-rw-r--r--gcc/config/frv/frv.c4
-rw-r--r--gcc/config/frv/frv.h45
3 files changed, 6 insertions, 48 deletions
diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h
index b176ddf32c6..91f203394a6 100644
--- a/gcc/config/frv/frv-protos.h
+++ b/gcc/config/frv/frv-protos.h
@@ -128,11 +128,6 @@ extern int frv_acc_group (rtx);
extern int frv_adjust_field_align (tree, int);
#endif
-extern void fixup_section (void);
-extern void sdata_section (void);
-extern void sbss_section (void);
-extern void data_section (void);
-
#ifdef RTX_CODE
extern int integer_register_operand (rtx, enum machine_mode);
extern int frv_load_operand (rtx, enum machine_mode);
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 4df467a3da4..82b7cbfd8c2 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -9542,7 +9542,7 @@ frv_rtx_costs (rtx x,
static void
frv_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
{
- ctors_section ();
+ switch_to_section (ctors_section);
assemble_align (POINTER_SIZE);
if (TARGET_FDPIC)
{
@@ -9557,7 +9557,7 @@ frv_asm_out_constructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
static void
frv_asm_out_destructor (rtx symbol, int priority ATTRIBUTE_UNUSED)
{
- dtors_section ();
+ switch_to_section (dtors_section);
assemble_align (POINTER_SIZE);
if (TARGET_FDPIC)
{
diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h
index d5586c06493..f330f3c5ca6 100644
--- a/gcc/config/frv/frv.h
+++ b/gcc/config/frv/frv.h
@@ -2272,43 +2272,6 @@ do { \
program so they can be changed program startup time if the program is loaded
at a different address than linked for. */
#define FIXUP_SECTION_ASM_OP "\t.section .rofixup,\"a\""
-
-/* A list of names for sections other than the standard two, which are
- `in_text' and `in_data'. You need not define this macro
- on a system with no other sections (that GCC needs to use). */
-#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_sdata, in_const, in_fixup
-
-/* One or more functions to be defined in "varasm.c". These
- functions should do jobs analogous to those of `text_section' and
- `data_section', for your additional sections. Do not define this
- macro if you do not define `EXTRA_SECTIONS'. */
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS \
- SDATA_SECTION_FUNCTION \
- FIXUP_SECTION_FUNCTION
-
-#define SDATA_SECTION_FUNCTION \
-void \
-sdata_section (void) \
-{ \
- if (in_section != in_sdata) \
- { \
- fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
- in_section = in_sdata; \
- } \
-}
-
-#define FIXUP_SECTION_FUNCTION \
-void \
-fixup_section (void) \
-{ \
- if (in_section != in_fixup) \
- { \
- fprintf (asm_out_file, "%s\n", FIXUP_SECTION_ASM_OP); \
- in_section = in_fixup; \
- } \
-}
/* Position Independent Code. */
@@ -2394,9 +2357,9 @@ extern int size_directive_output;
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \
do { \
if ((SIZE) > 0 && (SIZE) <= g_switch_value) \
- named_section (0, ".sbss", 0); \
+ switch_to_section (get_named_section (NULL, ".sbss", 0)); \
else \
- bss_section (); \
+ switch_to_section (bss_section); \
ASM_OUTPUT_ALIGN (STREAM, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL); \
ASM_OUTPUT_SKIP (STREAM, (SIZE) ? (SIZE) : 1); \
@@ -2652,8 +2615,8 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE)
#define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) \
do { \
if (flag_pic) \
- function_section (current_function_decl); \
- (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM); \
+ switch_to_section (function_section (current_function_decl)); \
+ (*targetm.asm_out.internal_label) (STREAM, PREFIX, NUM); \
} while (0)