Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/arm/elf.h @ 0:a06113de4d67
first commit
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2009 14:47:48 +0900 |
parents | |
children | 77e2b8dfacca |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a06113de4d67 |
---|---|
1 /* 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, 2007, | |
4 2008 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 SUBSUBTARGET_EXTRA_SPECS | |
41 #endif | |
42 | |
43 #ifndef SUBTARGET_EXTRA_ASM_SPEC | |
44 #define SUBTARGET_EXTRA_ASM_SPEC "" | |
45 #endif | |
46 | |
47 #ifndef SUBTARGET_ASM_FLOAT_SPEC | |
48 #define SUBTARGET_ASM_FLOAT_SPEC "\ | |
49 %{mapcs-float:-mfloat}" | |
50 #endif | |
51 | |
52 #undef SUBSUBTARGET_EXTRA_SPECS | |
53 #define SUBSUBTARGET_EXTRA_SPECS | |
54 | |
55 #ifndef ASM_SPEC | |
56 #define ASM_SPEC "\ | |
57 %{mbig-endian:-EB} \ | |
58 %{mlittle-endian:-EL} \ | |
59 %{mcpu=*:-mcpu=%*} \ | |
60 %{march=*:-march=%*} \ | |
61 %{mapcs-*:-mapcs-%*} \ | |
62 %(subtarget_asm_float_spec) \ | |
63 %{mthumb-interwork:-mthumb-interwork} \ | |
64 %{msoft-float:-mfloat-abi=soft} %{mhard-float:-mfloat-abi=hard} \ | |
65 %{mfloat-abi=*} %{mfpu=*} \ | |
66 %(subtarget_extra_asm_spec)" | |
67 #endif | |
68 | |
69 /* The ARM uses @ are a comment character so we need to redefine | |
70 TYPE_OPERAND_FMT. */ | |
71 #undef TYPE_OPERAND_FMT | |
72 #define TYPE_OPERAND_FMT "%%%s" | |
73 | |
74 /* We might need a ARM specific header to function declarations. */ | |
75 #undef ASM_DECLARE_FUNCTION_NAME | |
76 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ | |
77 do \ | |
78 { \ | |
79 ARM_DECLARE_FUNCTION_NAME (FILE, NAME, DECL); \ | |
80 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ | |
81 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ | |
82 ASM_OUTPUT_LABEL(FILE, NAME); \ | |
83 ARM_OUTPUT_FN_UNWIND (FILE, TRUE); \ | |
84 } \ | |
85 while (0) | |
86 | |
87 /* We might need an ARM specific trailer for function declarations. */ | |
88 #undef ASM_DECLARE_FUNCTION_SIZE | |
89 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ | |
90 do \ | |
91 { \ | |
92 ARM_OUTPUT_FN_UNWIND (FILE, FALSE); \ | |
93 if (!flag_inhibit_size_directive) \ | |
94 ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ | |
95 } \ | |
96 while (0) | |
97 | |
98 /* Define this macro if jump tables (for `tablejump' insns) should be | |
99 output in the text section, along with the assembler instructions. | |
100 Otherwise, the readonly data section is used. */ | |
101 /* We put ARM and Thumb-2 jump tables in the text section, because it makes | |
102 the code more efficient, but for Thumb-1 it's better to put them out of | |
103 band. */ | |
104 #define JUMP_TABLES_IN_TEXT_SECTION (TARGET_32BIT) | |
105 | |
106 #ifndef LINK_SPEC | |
107 #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" | |
108 #endif | |
109 | |
110 /* Run-time Target Specification. */ | |
111 #ifndef TARGET_VERSION | |
112 #define TARGET_VERSION fputs (" (ARM/elf)", stderr) | |
113 #endif | |
114 | |
115 #ifndef TARGET_DEFAULT | |
116 #define TARGET_DEFAULT (MASK_APCS_FRAME) | |
117 #endif | |
118 | |
119 #ifndef MULTILIB_DEFAULTS | |
120 #define MULTILIB_DEFAULTS \ | |
121 { "marm", "mlittle-endian", "msoft-float", "mno-thumb-interwork", "fno-leading-underscore" } | |
122 #endif | |
123 | |
124 #define TARGET_ASM_FILE_START_APP_OFF true | |
125 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true | |
126 | |
127 | |
128 /* Output an element in the static constructor array. */ | |
129 #undef TARGET_ASM_CONSTRUCTOR | |
130 #define TARGET_ASM_CONSTRUCTOR arm_elf_asm_constructor | |
131 | |
132 #undef TARGET_ASM_DESTRUCTOR | |
133 #define TARGET_ASM_DESTRUCTOR arm_elf_asm_destructor | |
134 | |
135 /* For PIC code we need to explicitly specify (PLT) and (GOT) relocs. */ | |
136 #define NEED_PLT_RELOC flag_pic | |
137 #define NEED_GOT_RELOC flag_pic | |
138 | |
139 /* The ELF assembler handles GOT addressing differently to NetBSD. */ | |
140 #define GOT_PCREL 0 | |
141 | |
142 /* Align output to a power of two. Note ".align 0" is redundant, | |
143 and also GAS will treat it as ".align 2" which we do not want. */ | |
144 #define ASM_OUTPUT_ALIGN(STREAM, POWER) \ | |
145 do \ | |
146 { \ | |
147 if ((POWER) > 0) \ | |
148 fprintf (STREAM, "\t.align\t%d\n", POWER); \ | |
149 } \ | |
150 while (0) | |
151 | |
152 /* Horrible hack: We want to prevent some libgcc routines being included | |
153 for some multilibs. */ | |
154 #ifndef __ARM_ARCH_6M__ | |
155 #undef L_fixdfsi | |
156 #undef L_fixunsdfsi | |
157 #undef L_truncdfsf2 | |
158 #undef L_fixsfsi | |
159 #undef L_fixunssfsi | |
160 #undef L_floatdidf | |
161 #undef L_floatdisf | |
162 #undef L_floatundidf | |
163 #undef L_floatundisf | |
164 #endif | |
165 |