From 4c12d23bdbcd15c023d361325be2970c04814c31 Mon Sep 17 00:00:00 2001 From: scw Date: Sat, 9 Dec 2000 20:38:04 +0000 Subject: [PATCH] Fix C++ static ctors/dtors by providing the same macros as defined in i386/netbsd-elf.h. --- gnu/dist/gcc/config/m68k/netbsd-elf.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/dist/gcc/config/m68k/netbsd-elf.h b/gnu/dist/gcc/config/m68k/netbsd-elf.h index cc9e27a8449b..a173ff44a102 100644 --- a/gnu/dist/gcc/config/m68k/netbsd-elf.h +++ b/gnu/dist/gcc/config/m68k/netbsd-elf.h @@ -244,6 +244,26 @@ dtors_section () \ (DECL) && TREE_CODE (DECL) == FUNCTION_DECL ? "ax" : \ (DECL) && DECL_READONLY_SECTION (DECL, RELOC) ? "a" : "aw") +/* 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.long\t "); \ + 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.long\t "); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) + /* These macros generate the special .type and .size directives which are used to set the corresponding fields of the linker symbol table entries in an ELF object file under SVR4. These macros also output