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
This commit is contained in:
Klaus Kaempf 1998-06-09 12:12:13 +00:00 committed by Richard Henderson
parent d23a1bb127
commit 6805ef53ca
2 changed files with 47 additions and 1 deletions

View File

@ -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,

View File

@ -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 ();