* Makefile.in (rtlanal.o): Depend on $(TM_P_H).
[official-gcc.git] / gcc / config / arm / coff.h
blobdb057b917a3562aa66661e3103e5279c9b403282
1 /* Definitions of target machine for GNU compiler.
2 For ARM with COFF object format.
3 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
4 Free Software Foundation, Inc.
5 Contributed by Doug Evans (devans@cygnus.com).
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 #include "semi.h"
25 #include "aout.h"
27 /* Note - it is important that this definition matches the one in tcoff.h */
28 #undef USER_LABEL_PREFIX
29 #define USER_LABEL_PREFIX "_"
32 /* Run-time Target Specification. */
33 #undef TARGET_VERSION
34 #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
36 #undef TARGET_DEFAULT
37 #define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME)
39 #ifndef MULTILIB_DEFAULTS
40 #define MULTILIB_DEFAULTS \
41 { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
42 #endif
44 /* This is COFF, but prefer stabs. */
45 #define SDB_DEBUGGING_INFO
47 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
49 #include "dbxcoff.h"
51 /* A C statement to output assembler commands which will identify the
52 object file as having been compiled with GNU CC (or another GNU
53 compiler). */
55 /* This outputs a lot of .req's to define alias for various registers.
56 Let's try to avoid this. */
57 #undef ASM_FILE_START
58 #define ASM_FILE_START(STREAM) \
59 do \
60 { \
61 fprintf (STREAM, "%s Generated by gcc %s for ARM/coff\n", \
62 ASM_COMMENT_START, version_string); \
63 fprintf (STREAM, ASM_APP_OFF); \
64 } \
65 while (0)
67 /* Switch into a generic section. */
68 #define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section
70 /* Support the ctors/dtors and other sections. */
72 #undef INIT_SECTION_ASM_OP
74 /* Define this macro if jump tables (for `tablejump' insns) should be
75 output in the text section, along with the assembler instructions.
76 Otherwise, the readonly data section is used. */
77 #define JUMP_TABLES_IN_TEXT_SECTION 1
79 #undef READONLY_DATA_SECTION
80 #define READONLY_DATA_SECTION rdata_section
81 #undef RDATA_SECTION_ASM_OP
82 #define RDATA_SECTION_ASM_OP "\t.section .rdata"
83 #undef CTORS_SECTION_ASM_OP
84 #define CTORS_SECTION_ASM_OP "\t.section .ctors,\"x\""
85 #undef DTORS_SECTION_ASM_OP
86 #define DTORS_SECTION_ASM_OP "\t.section .dtors,\"x\""
88 /* A list of other sections which the compiler might be "in" at any
89 given time. */
91 #undef EXTRA_SECTIONS
92 #define EXTRA_SECTIONS SUBTARGET_EXTRA_SECTIONS in_rdata
94 #define SUBTARGET_EXTRA_SECTIONS
96 /* A list of extra section function definitions. */
98 #undef EXTRA_SECTION_FUNCTIONS
99 #define EXTRA_SECTION_FUNCTIONS \
100 RDATA_SECTION_FUNCTION \
101 SUBTARGET_EXTRA_SECTION_FUNCTIONS
103 #define SUBTARGET_EXTRA_SECTION_FUNCTIONS
105 #define RDATA_SECTION_FUNCTION \
106 void \
107 rdata_section () \
109 if (in_section != in_rdata) \
111 fprintf (asm_out_file, "%s\n", RDATA_SECTION_ASM_OP); \
112 in_section = in_rdata; \
116 /* Support the ctors/dtors sections for g++. */
118 #define INT_ASM_OP "\t.word\t"
120 /* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script. */
121 #define CTOR_LISTS_DEFINED_EXTERNALLY
123 #undef DO_GLOBAL_CTORS_BODY
124 #undef DO_GLOBAL_DTORS_BODY
126 /* The ARM development system defines __main. */
127 #define NAME__MAIN "__gccmain"
128 #define SYMBOL__MAIN __gccmain