i386-coff.h revision 52284
1193323Sed/* Definitions for "naked" Intel 386 using coff object format files 2193323Sed and coff debugging info. 3193323Sed 4193323Sed Copyright (C) 1994 Free Software Foundation, Inc. 5193323Sed 6193323SedThis file is part of GNU CC. 7193323Sed 8193323SedGNU CC is free software; you can redistribute it and/or modify 9193323Sedit under the terms of the GNU General Public License as published by 10193323Sedthe Free Software Foundation; either version 2, or (at your option) 11193323Sedany later version. 12193323Sed 13193323SedGNU CC is distributed in the hope that it will be useful, 14193323Sedbut WITHOUT ANY WARRANTY; without even the implied warranty of 15193323SedMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16193323SedGNU General Public License for more details. 17193323Sed 18193323SedYou should have received a copy of the GNU General Public License 19193323Sedalong with GNU CC; see the file COPYING. If not, write to 20193323Sedthe Free Software Foundation, 59 Temple Place - Suite 330, 21193323SedBoston, MA 02111-1307, USA. */ 22193323Sed 23193323Sed 24193323Sed#include "i386/gas.h" 25193323Sed#include "dbxcoff.h" 26193323Sed 27193323Sed/* Specify predefined symbols in preprocessor. */ 28193323Sed 29193323Sed#undef CPP_PREDEFINES 30193323Sed#define CPP_PREDEFINES "-Di386" 31193323Sed 32193323Sed/* We want to be able to get DBX debugging information via -gstabs. */ 33193323Sed 34193323Sed#undef DBX_DEBUGGING_INFO 35193323Sed#define DBX_DEBUGGING_INFO 36193323Sed 37193323Sed#undef PREFERRED_DEBUGGING_TYPE 38193323Sed#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG 39193323Sed 40193323Sed/* Support the ctors and dtors sections for g++. */ 41193323Sed 42193323Sed#define CTORS_SECTION_ASM_OP ".section\t.ctors,\"x\"" 43193323Sed#define DTORS_SECTION_ASM_OP ".section\t.dtors,\"x\"" 44193323Sed 45193323Sed/* A list of other sections which the compiler might be "in" at any 46193323Sed given time. */ 47193323Sed 48193323Sed#undef EXTRA_SECTIONS 49193323Sed#define EXTRA_SECTIONS in_ctors, in_dtors 50193323Sed 51193323Sed/* A list of extra section function definitions. */ 52193323Sed 53193323Sed#undef EXTRA_SECTION_FUNCTIONS 54193323Sed#define EXTRA_SECTION_FUNCTIONS \ 55193323Sed CTORS_SECTION_FUNCTION \ 56193323Sed DTORS_SECTION_FUNCTION 57193323Sed 58193323Sed#define CTORS_SECTION_FUNCTION \ 59193323Sedvoid \ 60193323Sedctors_section () \ 61193323Sed{ \ 62193323Sed if (in_section != in_ctors) \ 63193323Sed { \ 64193323Sed fprintf (asm_out_file, "%s\n", CTORS_SECTION_ASM_OP); \ 65193323Sed in_section = in_ctors; \ 66193323Sed } \ 67193323Sed} 68193323Sed 69193323Sed#define DTORS_SECTION_FUNCTION \ 70193323Sedvoid \ 71193323Seddtors_section () \ 72193323Sed{ \ 73193323Sed if (in_section != in_dtors) \ 74193323Sed { \ 75193323Sed fprintf (asm_out_file, "%s\n", DTORS_SECTION_ASM_OP); \ 76193323Sed in_section = in_dtors; \ 77193323Sed } \ 78193323Sed} 79193323Sed 80193323Sed#define INT_ASM_OP ".long" 81193323Sed 82193323Sed/* A C statement (sans semicolon) to output an element in the table of 83193323Sed global constructors. */ 84193323Sed#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ 85193323Sed do { \ 86193323Sed ctors_section (); \ 87193323Sed fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 88193323Sed assemble_name (FILE, NAME); \ 89193323Sed fprintf (FILE, "\n"); \ 90193323Sed } while (0) 91193323Sed 92193323Sed/* A C statement (sans semicolon) to output an element in the table of 93193323Sed global destructors. */ 94193323Sed#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ 95193323Sed do { \ 96193323Sed dtors_section (); \ 97193323Sed fprintf (FILE, "\t%s\t ", INT_ASM_OP); \ 98193323Sed assemble_name (FILE, NAME); \ 99193323Sed fprintf (FILE, "\n"); \ 100193323Sed } while (0) 101193323Sed 102193323Sed 103193323Sed/* end of i386-coff.h */ 104193323Sed