i386-coff.h revision 18334
1258945Sroberto/* Definitions for "naked" Intel 386 using coff object format files 2258945Sroberto and coff debugging info. 3258945Sroberto 4258945Sroberto Copyright (C) 1994 Free Software Foundation, Inc. 5258945Sroberto 6258945SrobertoThis file is part of GNU CC. 7258945Sroberto 8258945SrobertoGNU CC is free software; you can redistribute it and/or modify 9258945Srobertoit under the terms of the GNU General Public License as published by 10258945Srobertothe Free Software Foundation; either version 2, or (at your option) 11258945Srobertoany later version. 12258945Sroberto 13258945SrobertoGNU CC is distributed in the hope that it will be useful, 14258945Srobertobut WITHOUT ANY WARRANTY; without even the implied warranty of 15258945SrobertoMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16258945SrobertoGNU General Public License for more details. 17258945Sroberto 18258945SrobertoYou should have received a copy of the GNU General Public License 19258945Srobertoalong with GNU CC; see the file COPYING. If not, write to 20258945Srobertothe Free Software Foundation, 59 Temple Place - Suite 330, 21258945SrobertoBoston, MA 02111-1307, USA. */ 22258945Sroberto 23258945Sroberto 24258945Sroberto#include "i386/gas.h" 25258945Sroberto 26258945Sroberto/* Specify predefined symbols in preprocessor. */ 27258945Sroberto 28258945Sroberto#undef CPP_PREDEFINES 29258945Sroberto#define CPP_PREDEFINES "-Di386" 30258945Sroberto 31258945Sroberto#undef DBX_DEBUGGING_INFO 32258945Sroberto#define SDB_DEBUGGING_INFO 33258945Sroberto 34258945Sroberto/* Support the ctors and dtors sections for g++. */ 35258945Sroberto 36258945Sroberto#define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" 37258945Sroberto#define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" 38258945Sroberto 39258945Sroberto/* A list of other sections which the compiler might be "in" at any 40258945Sroberto given time. */ 41258945Sroberto 42258945Sroberto#undef EXTRA_SECTIONS 43258945Sroberto#define EXTRA_SECTIONS in_ctors, in_dtors 44258945Sroberto 45258945Sroberto/* A list of extra section function definitions. */ 46258945Sroberto 47258945Sroberto#undef EXTRA_SECTION_FUNCTIONS 48258945Sroberto#define EXTRA_SECTION_FUNCTIONS \ 49258945Sroberto CTORS_SECTION_FUNCTION \ 50258945Sroberto DTORS_SECTION_FUNCTION 51258945Sroberto 52258945Sroberto#define CTORS_SECTION_FUNCTION \ 53258945Srobertovoid \ 54258945Srobertoctors_section () \ 55258945Sroberto{ \ 56258945Sroberto if (in_section != in_ctors) \ 57258945Sroberto { \ 58258945Sroberto fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ 59258945Sroberto in_section = in_ctors; \ 60258945Sroberto } \ 61258945Sroberto} 62258945Sroberto 63258945Sroberto#define DTORS_SECTION_FUNCTION \ 64258945Srobertovoid \ 65258945Srobertodtors_section () \ 66258945Sroberto{ \ 67258945Sroberto if (in_section != in_dtors) \ 68258945Sroberto { \ 69258945Sroberto fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ 70258945Sroberto in_section = in_dtors; \ 71258945Sroberto } \ 72258945Sroberto} 73258945Sroberto 74258945Sroberto#define INT_ASM_OP ".long" 75258945Sroberto 76258945Sroberto/* A C statement (sans semicolon) to output an element in the table of 77258945Sroberto global constructors. */ 78258945Sroberto#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ 79258945Sroberto do { \ 80258945Sroberto ctors_section (); \ 81258945Sroberto fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 82258945Sroberto assemble_name (FILE, NAME); \ 83258945Sroberto fprintf (FILE, "\n"); \ 84258945Sroberto } while (0) 85258945Sroberto 86258945Sroberto/* A C statement (sans semicolon) to output an element in the table of 87258945Sroberto global destructors. */ 88258945Sroberto#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ 89258945Sroberto do { \ 90258945Sroberto dtors_section (); \ 91258945Sroberto fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 92258945Sroberto assemble_name (FILE, NAME); \ 93258945Sroberto fprintf (FILE, "\n"); \ 94258945Sroberto } while (0) 95258945Sroberto 96258945Sroberto 97258945Sroberto/* end of i386-coff.h */ 98258945Sroberto