summaryrefslogtreecommitdiff
path: root/gcc/config/i386/sco5.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-08-09 15:33:35 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-08-09 15:33:35 -0700
commit2cc07db4b089b8b3df05261f1d7acbc96d2e720a (patch)
treeddb2d5519f49bc33648c25225b8b8ba84df590b9 /gcc/config/i386/sco5.h
parentef8d8b8922a034dfac5cff9d5fa781dc57c49ed0 (diff)
downloadgcc-2cc07db4b089b8b3df05261f1d7acbc96d2e720a.tar.gz
Move constructor/destructor handling into target hooks.
From-SVN: r44747
Diffstat (limited to 'gcc/config/i386/sco5.h')
-rw-r--r--gcc/config/i386/sco5.h63
1 files changed, 4 insertions, 59 deletions
diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h
index b7a7cdbfd29..a8184270821 100644
--- a/gcc/config/i386/sco5.h
+++ b/gcc/config/i386/sco5.h
@@ -390,37 +390,8 @@ do { \
ASM_OUTPUT_INTERNAL_LABEL((FILE),(PREFIX),(NUM)); \
} while (0)
-
-#undef ASM_OUTPUT_CONSTRUCTOR
-#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
-do { \
- if (TARGET_ELF) { \
- ctors_section (); \
- fprintf (FILE, "%s", INT_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } else { \
- init_section (); \
- fprintf (FILE, "\tpushl $"); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); } \
- } while (0)
-
-#undef ASM_OUTPUT_DESTRUCTOR
-#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
-do { \
- if (TARGET_ELF) { \
- dtors_section (); \
- fprintf (FILE, "%s", INT_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); \
- } else { \
- fini_section (); \
- fprintf (FILE, "%s", INT_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, "\n"); } \
- } while (0)
-
+#undef TARGET_ASM_CONSTRUCTOR
+#define TARGET_ASM_CONSTRUCTOR sco_asm_out_constructor
#undef ASM_OUTPUT_IDENT
#define ASM_OUTPUT_IDENT(FILE, NAME) \
@@ -508,15 +479,13 @@ do { \
((TARGET_ELF) ? DWARF2_DEBUG: SDB_DEBUG)
#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_const, in_init, in_fini, in_ctors, in_dtors
+#define EXTRA_SECTIONS in_const, in_init, in_fini
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
CONST_SECTION_FUNCTION \
INIT_SECTION_FUNCTION \
- FINI_SECTION_FUNCTION \
- CTORS_SECTION_FUNCTION \
- DTORS_SECTION_FUNCTION
+ FINI_SECTION_FUNCTION
#undef CONST_SECTION_FUNCTION
#define CONST_SECTION_FUNCTION \
@@ -556,30 +525,6 @@ init_section () \
} \
}
-#undef CTORS_SECTION_FUNCTION
-#define CTORS_SECTION_FUNCTION \
-void \
-ctors_section () \
-{ \
- if (in_section != in_ctors) \
- { \
- fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \
- in_section = in_ctors; \
- } \
-}
-
-#undef DTORS_SECTION_FUNCTION
-#define DTORS_SECTION_FUNCTION \
-void \
-dtors_section () \
-{ \
- if (in_section != in_dtors) \
- { \
- fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \
- in_section = in_dtors; \
- } \
-}
-
#undef SUBTARGET_FRAME_POINTER_REQUIRED
#define SUBTARGET_FRAME_POINTER_REQUIRED \
((TARGET_ELF) ? 0 : \