coff.h 2.89 KB
Newer Older
1 2
/* Definitions of target machine for GNU compiler.
   For ARM with COFF object format.
3
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005,
4
   2007, 2009, 2011 Free Software Foundation, Inc.
5
   Contributed by Doug Evans (devans@cygnus.com).
dje's avatar
dje committed
6
   
7
   This file is part of GCC.
dje's avatar
dje committed
8

9 10
   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
11
   by the Free Software Foundation; either version 3, or (at your
12
   option) any later version.
dje's avatar
dje committed
13

14 15 16 17
   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.
dje's avatar
dje committed
18

19
   You should have received a copy of the GNU General Public License
20 21
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */
dje's avatar
dje committed
22

23
/* Note - it is important that this definition matches the one in tcoff.h.  */
nickc's avatar
nickc committed
24 25 26
#undef  USER_LABEL_PREFIX
#define USER_LABEL_PREFIX "_"

dje's avatar
dje committed
27 28

/* Run-time Target Specification.  */
29
#undef  TARGET_VERSION
dje's avatar
dje committed
30 31
#define TARGET_VERSION fputs (" (ARM/coff)", stderr)

32 33 34
#undef  TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT

35
#undef  TARGET_DEFAULT
36
#define TARGET_DEFAULT (MASK_APCS_FRAME)
dje's avatar
dje committed
37

38 39
#ifndef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
40
  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }
41
#endif
dje's avatar
dje committed
42 43

/* This is COFF, but prefer stabs.  */
44
#define SDB_DEBUGGING_INFO 1
dje's avatar
dje committed
45 46 47 48

#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG


49
#define TARGET_ASM_FILE_START_APP_OFF true
dje's avatar
dje committed
50

51 52
/* Switch into a generic section.  */
#define TARGET_ASM_NAMED_SECTION  default_coff_asm_named_section
dje's avatar
dje committed
53 54 55 56 57 58 59 60

/* Support the ctors/dtors and other sections.  */

#undef INIT_SECTION_ASM_OP

/* Define this macro if jump tables (for `tablejump' insns) should be
   output in the text section, along with the assembler instructions.
   Otherwise, the readonly data section is used.  */
61 62
/* We put ARM and Thumb-2 jump tables in the text section, because it makes
   the code more efficient, but for Thumb-1 it's better to put them out of
63 64 65
   band unless we are generating compressed tables.  */
#define JUMP_TABLES_IN_TEXT_SECTION					\
   (TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic)))
dje's avatar
dje committed
66

67 68
#undef  READONLY_DATA_SECTION_ASM_OP
#define READONLY_DATA_SECTION_ASM_OP	"\t.section .rdata"
69
#undef  CTORS_SECTION_ASM_OP
dje's avatar
dje committed
70
#define CTORS_SECTION_ASM_OP	"\t.section .ctors,\"x\""
71
#undef  DTORS_SECTION_ASM_OP
dje's avatar
dje committed
72 73 74 75 76 77 78 79 80 81 82
#define DTORS_SECTION_ASM_OP	"\t.section .dtors,\"x\""

/* Support the ctors/dtors sections for g++.  */

/* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script.  */
#define CTOR_LISTS_DEFINED_EXTERNALLY

#undef DO_GLOBAL_CTORS_BODY
#undef DO_GLOBAL_DTORS_BODY

/* The ARM development system defines __main.  */
83
#define NAME__MAIN  "__gccmain"
dje's avatar
dje committed
84
#define SYMBOL__MAIN __gccmain
nickc's avatar
nickc committed
85 86

#define SUPPORTS_INIT_PRIORITY 0