+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,
#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 \
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
#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 ();