OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [arm/] [elf.h] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* Definitions of target machine for GNU compiler.
2
   For ARM with ELF obj format.
3
   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004, 2005,
4
   2007 Free Software Foundation, Inc.
5
   Contributed by Philip Blundell <philb@gnu.org> and
6
   Catherine Moore <clm@cygnus.com>
7
 
8
   This file is part of GCC.
9
 
10
   GCC is free software; you can redistribute it and/or modify it
11
   under the terms of the GNU General Public License as published
12
   by the Free Software Foundation; either version 3, or (at your
13
   option) any later version.
14
 
15
   GCC is distributed in the hope that it will be useful, but WITHOUT
16
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
18
   License for more details.
19
 
20
   You should have received a copy of the GNU General Public License
21
   along with GCC; see the file COPYING3.  If not see
22
   <http://www.gnu.org/licenses/>.  */
23
 
24
#ifndef OBJECT_FORMAT_ELF
25
 #error elf.h included before elfos.h
26
#endif
27
 
28
#ifndef LOCAL_LABEL_PREFIX
29
#define LOCAL_LABEL_PREFIX "."
30
#endif
31
 
32
#ifndef SUBTARGET_CPP_SPEC
33
#define SUBTARGET_CPP_SPEC  "-D__ELF__"
34
#endif
35
 
36
#ifndef SUBTARGET_EXTRA_SPECS
37
#define SUBTARGET_EXTRA_SPECS \
38
  { "subtarget_extra_asm_spec", SUBTARGET_EXTRA_ASM_SPEC }, \
39
  { "subtarget_asm_float_spec", SUBTARGET_ASM_FLOAT_SPEC },
40
#endif
41
 
42
#ifndef SUBTARGET_EXTRA_ASM_SPEC
43
#define SUBTARGET_EXTRA_ASM_SPEC ""
44
#endif
45
 
46
#ifndef SUBTARGET_ASM_FLOAT_SPEC
47
#define SUBTARGET_ASM_FLOAT_SPEC "\
48
%{mapcs-float:-mfloat}"
49
#endif
50
 
51
#ifndef ASM_SPEC
52
#define ASM_SPEC "\
53
%{mbig-endian:-EB} \
54
%{mlittle-endian:-EL} \
55
%{mcpu=*:-mcpu=%*} \
56
%{march=*:-march=%*} \
57
%{mapcs-*:-mapcs-%*} \
58
%(subtarget_asm_float_spec) \
59
%{mthumb-interwork:-mthumb-interwork} \
60
%{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \
61
%{mfloat-abi=*} %{mfpu=*} \
62
%(subtarget_extra_asm_spec)"
63
#endif
64
 
65
/* The ARM uses @ are a comment character so we need to redefine
66
   TYPE_OPERAND_FMT.  */
67
#undef  TYPE_OPERAND_FMT
68
#define TYPE_OPERAND_FMT        "%%%s"
69
 
70
/* We might need a ARM specific header to function declarations.  */
71
#undef  ASM_DECLARE_FUNCTION_NAME
72
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)             \
73
  do                                                            \
74
    {                                                           \
75
      ARM_DECLARE_FUNCTION_NAME (FILE, NAME, DECL);             \
76
      ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function");       \
77
      ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));            \
78
      ASM_OUTPUT_LABEL(FILE, NAME);                             \
79
      ARM_OUTPUT_FN_UNWIND (FILE, TRUE);                        \
80
    }                                                           \
81
  while (0)
82
 
83
/* We might need an ARM specific trailer for function declarations.  */
84
#undef  ASM_DECLARE_FUNCTION_SIZE
85
#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)            \
86
  do                                                            \
87
    {                                                           \
88
      ARM_OUTPUT_FN_UNWIND (FILE, FALSE);                       \
89
      ARM_DECLARE_FUNCTION_SIZE (FILE, FNAME, DECL);            \
90
      if (!flag_inhibit_size_directive)                         \
91
        ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);                 \
92
    }                                                           \
93
  while (0)
94
 
95
/* Define this macro if jump tables (for `tablejump' insns) should be
96
   output in the text section, along with the assembler instructions.
97
   Otherwise, the readonly data section is used.  */
98
/* We put ARM jump tables in the text section, because it makes the code
99
   more efficient, but for Thumb it's better to put them out of band.  */
100
#define JUMP_TABLES_IN_TEXT_SECTION (TARGET_ARM)
101
 
102
#ifndef LINK_SPEC
103
#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
104
#endif
105
 
106
/* Run-time Target Specification.  */
107
#ifndef TARGET_VERSION
108
#define TARGET_VERSION fputs (" (ARM/elf)", stderr)
109
#endif
110
 
111
#ifndef TARGET_DEFAULT
112
#define TARGET_DEFAULT (MASK_APCS_FRAME)
113
#endif
114
 
115
#ifndef MULTILIB_DEFAULTS
116
#define MULTILIB_DEFAULTS \
117
  { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork", "fno-leading-underscore" }
118
#endif
119
 
120
#define TARGET_ASM_FILE_START_APP_OFF true
121
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
122
 
123
 
124
/* Output an element in the static constructor array.  */
125
#undef TARGET_ASM_CONSTRUCTOR
126
#define TARGET_ASM_CONSTRUCTOR arm_elf_asm_constructor
127
 
128
/* For PIC code we need to explicitly specify (PLT) and (GOT) relocs.  */
129
#define NEED_PLT_RELOC  flag_pic
130
#define NEED_GOT_RELOC  flag_pic
131
 
132
/* The ELF assembler handles GOT addressing differently to NetBSD.  */
133
#define GOT_PCREL       0
134
 
135
/* Biggest alignment supported by the object file format of this
136
   machine.  Use this macro to limit the alignment which can be
137
   specified using the `__attribute__ ((aligned (N)))' construct.  If
138
   not defined, the default value is `BIGGEST_ALIGNMENT'.  */
139
#define MAX_OFILE_ALIGNMENT (32768 * 8)
140
 
141
/* Align output to a power of two.  Note ".align 0" is redundant,
142
   and also GAS will treat it as ".align 2" which we do not want.  */
143
#define ASM_OUTPUT_ALIGN(STREAM, POWER)                 \
144
  do                                                    \
145
    {                                                   \
146
      if ((POWER) > 0)                                  \
147
        fprintf (STREAM, "\t.align\t%d\n", POWER);      \
148
    }                                                   \
149
  while (0)
150
 
151
/* The EABI doesn't provide a way of implementing init_priority.  */
152
#define SUPPORTS_INIT_PRIORITY (!TARGET_AAPCS_BASED)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.