diff options
author | Klaus Kaempf <kkaempf@progis.de> | 1998-06-09 12:12:13 +0000 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1998-06-09 05:12:13 -0700 |
commit | 6805ef53cac4b69d0ff3659c7415fcfb3e577dc4 (patch) | |
tree | 4b5a1955bdc6a23556307d84e585934ea926a351 /gcc | |
parent | d23a1bb1274291149ed419b2a89ed80e73b4d0ca (diff) | |
download | gcc-6805ef53cac4b69d0ff3659c7415fcfb3e577dc4.zip gcc-6805ef53cac4b69d0ff3659c7415fcfb3e577dc4.tar.gz gcc-6805ef53cac4b69d0ff3659c7415fcfb3e577dc4.tar.bz2 |
vms.h (EXTRA_SECTIONS): Add in_ctors and in_dtors.
* alpha/vms.h (EXTRA_SECTIONS): Add in_ctors and in_dtors.
(EXTRA_SECTION_FUNCTIONS): Add ctors_section and dtors_section.
(ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Define.
From-SVN: r20376
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/alpha/vms.h | 42 |
2 files changed, 47 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 65bd3f6..22ae665 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Tue Jun 9 12:12:34 1998 Klaus Kaempf (kkaempf@progis.de) + + * alpha/vms.h (EXTRA_SECTIONS): Add in_ctors and in_dtors. + (EXTRA_SECTION_FUNCTIONS): Add ctors_section and dtors_section. + (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Define. + Tue Jun 9 12:10:27 1998 John Carr <jfc@mit.edu> * haifa-sched.c (update_flow_info): Use UNITS_PER_WORD, not MOVE_MAX, diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index a10b2f0..2909af6 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -289,9 +289,11 @@ extern struct rtx_def *alpha_arg_info_reg_val (); #define LINK_SECTION_ASM_OP ".link" #define READONLY_SECTION_ASM_OP ".rdata" #define LITERALS_SECTION_ASM_OP ".literals" +#define CTORS_SECTION_ASM_OP ".ctors" +#define DTORS_SECTION_ASM_OP ".dtors" #undef EXTRA_SECTIONS -#define EXTRA_SECTIONS in_link, in_rdata, in_literals +#define EXTRA_SECTIONS in_link, in_rdata, in_literals, in_ctors, in_dtors #undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ @@ -321,6 +323,24 @@ literals_section () \ fprintf (asm_out_file, "%s\n", LITERALS_SECTION_ASM_OP); \ in_section = in_literals; \ } \ +} \ +void \ +ctors_section () \ +{ \ + if (in_section != in_ctors) \ + { \ + fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ + in_section = in_ctors; \ + } \ +} \ +void \ +dtors_section () \ +{ \ + if (in_section != in_dtors) \ + { \ + fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ + in_section = in_dtors; \ + } \ } #undef ASM_OUTPUT_ADDR_DIFF_ELT @@ -399,6 +419,26 @@ do { \ #undef TRANSFER_FROM_TRAMPOLINE +/* A C statement (sans semicolon) to output an element in the table of + global constructors. */ +#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ + do { \ + ctors_section (); \ + fprintf (FILE, "\t.quad "); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + +/* A C statement (sans semicolon) to output an element in the table of + global destructors. */ +#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ + do { \ + dtors_section (); \ + fprintf (FILE, "\t.quad "); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, NAME, ARGS) \ (vms_valid_decl_attribute_p (DECL, ATTRIBUTES, NAME, ARGS)) extern int vms_valid_decl_attribute_p (); |