diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-09 22:33:35 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-09 22:33:35 +0000 |
commit | 01d15dc570c9d303e03ad64a0f66a38f5ce4b8bd (patch) | |
tree | ddb2d5519f49bc33648c25225b8b8ba84df590b9 /gcc/config/sparc | |
parent | be6b7965bba925cee48dfe2af6c9a40e85c744c1 (diff) | |
download | gcc-01d15dc570c9d303e03ad64a0f66a38f5ce4b8bd.tar.gz |
Move constructor/destructor handling into target hooks.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sparc')
-rw-r--r-- | gcc/config/sparc/linux64.h | 28 | ||||
-rw-r--r-- | gcc/config/sparc/litecoff.h | 57 | ||||
-rw-r--r-- | gcc/config/sparc/sol2-sld-64.h | 28 |
3 files changed, 2 insertions, 111 deletions
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 3481c4b4c27..d72f57f08ce 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -387,31 +387,3 @@ do { \ : /* no outputs */ \ : "r" (ms_flags), "r" (ms_saveret)); #endif /* sparc32 */ - -/* A C statement (sans semicolon) to output an element in the table of - global constructors. */ -#undef ASM_OUTPUT_CONSTRUCTOR -#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ - do { \ - ctors_section (); \ - if (TARGET_ARCH64) \ - fprintf (FILE, "\t%s\t ", ASM_LONGLONG); \ - else \ - fprintf (FILE, "%s", INT_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) - -/* A C statement (sans semicolon) to output an element in the table of - global destructors. */ -#undef ASM_OUTPUT_DESTRUCTOR -#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ - do { \ - dtors_section (); \ - if (TARGET_ARCH64) \ - fprintf (FILE, "\t%s\t ", ASM_LONGLONG); \ - else \ - fprintf (FILE, "%s", INT_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) diff --git a/gcc/config/sparc/litecoff.h b/gcc/config/sparc/litecoff.h index c662eb3f5b0..e2340c3bdf0 100644 --- a/gcc/config/sparc/litecoff.h +++ b/gcc/config/sparc/litecoff.h @@ -42,72 +42,19 @@ Boston, MA 02111-1307, USA. */ #undef INIT_SECTION_ASM_OP -/* Support the ctors and dtors sections for g++. */ - -#undef CTORS_SECTION_ASM_OP -#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"x\"" -#undef DTORS_SECTION_ASM_OP -#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"x\"" - /* A list of other sections which the compiler might be "in" at any given time. */ #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_const, in_ctors, in_dtors +#define EXTRA_SECTIONS in_const /* A list of extra section function definitions. */ #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ - CONST_SECTION_FUNCTION \ - CTORS_SECTION_FUNCTION \ - DTORS_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; \ - } \ -} - -#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; \ - } \ -} + CONST_SECTION_FUNCTION #define INT_ASM_OP "\t.long\t" -/* A C statement (sans semicolon) to output an element in the table of - global constructors. */ -#undef ASM_OUTPUT_CONSTRUCTOR -#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ - do { \ - ctors_section (); \ - fprintf (FILE, "%s", INT_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) - -/* A C statement (sans semicolon) to output an element in the table of - global destructors. */ -#undef ASM_OUTPUT_DESTRUCTOR -#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ - do { \ - dtors_section (); \ - fprintf (FILE, "%s", INT_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) - #undef DO_GLOBAL_CTORS_BODY #undef DO_GLOBAL_DTORS_BODY diff --git a/gcc/config/sparc/sol2-sld-64.h b/gcc/config/sparc/sol2-sld-64.h index 9179635c636..21545f2f84e 100644 --- a/gcc/config/sparc/sol2-sld-64.h +++ b/gcc/config/sparc/sol2-sld-64.h @@ -329,32 +329,4 @@ #endif /* ! SPARC_BI_ARCH */ -/* A C statement (sans semicolon) to output an element in the table of - global constructors. */ -#undef ASM_OUTPUT_CONSTRUCTOR -#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ - do { \ - ctors_section (); \ - if (TARGET_ARCH64) \ - fprintf (FILE, "\t%s\t ", ASM_LONGLONG); \ - else \ - fprintf (FILE, "%s", INT_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) - -/* A C statement (sans semicolon) to output an element in the table of - global destructors. */ -#undef ASM_OUTPUT_DESTRUCTOR -#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ - do { \ - dtors_section (); \ - if (TARGET_ARCH64) \ - fprintf (FILE, "\t%s\t ", ASM_LONGLONG); \ - else \ - fprintf (FILE, "%s", INT_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, "\n"); \ - } while (0) - #endif |