OSDN Git Service

Pass pointer to RTX when calling alter_subreg().
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / linux-elf.h
1 /* Definitions for ARM running Linux-based GNU systems using ELF
2    Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001 
3    Free Software Foundation, Inc.
4    Contributed by Philip Blundell <philb@gnu.org>
5
6 This file is part of GNU CC.
7
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING.  If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.  */
22
23 /* elfos.h should have already been included.  Now just override
24    any conflicting definitions and add any extras.  */
25
26 /* Run-time Target Specification.  */
27 #undef  TARGET_VERSION
28 #define TARGET_VERSION  fputs (" (ARM GNU/Linux with ELF)", stderr);
29
30 /* Do not assume anything about header files.  */
31 #define NO_IMPLICIT_EXTERN_C
32
33 /* Default is to use APCS-32 mode.  */
34 #undef  TARGET_DEFAULT
35 #define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
36
37 #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
38
39 #undef  MULTILIB_DEFAULTS
40 #define MULTILIB_DEFAULTS \
41         { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
42
43 #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
44
45 /* Now we define the strings used to build the spec file.  */
46 #define LIB_SPEC \
47   "%{shared: -lc} \
48    %{!shared: %{pthread:-lpthread} \
49    %{profile:-lc_p} %{!profile: -lc}}"
50
51 #define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
52
53 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
54    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
55    provides part of the support for getting C++ file-scope static
56    object constructed before entering `main'. */
57    
58 #undef  STARTFILE_SPEC
59 #define STARTFILE_SPEC \
60   "%{!shared: \
61      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
62                        %{!p:%{profile:gcrt1.o%s} \
63                          %{!profile:crt1.o%s}}}} \
64    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
65
66 /* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
67    the GNU/Linux magical crtend.o file (see crtstuff.c) which
68    provides part of the support for getting C++ file-scope static
69    object constructed before entering `main', followed by a normal
70    GNU/Linux "finalizer" file, `crtn.o'.  */
71
72 #undef  ENDFILE_SPEC
73 #define ENDFILE_SPEC \
74   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
75
76 #undef  LINK_SPEC
77 #define LINK_SPEC "%{h*} %{version:-v} \
78    %{b} %{Wl,*:%*} \
79    %{static:-Bstatic} \
80    %{shared:-shared} \
81    %{symbolic:-Bsymbolic} \
82    %{rdynamic:-export-dynamic} \
83    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
84    -X \
85    %{mbig-endian:-EB}" \
86    SUBTARGET_EXTRA_LINK_SPEC
87
88 #undef  CPP_PREDEFINES
89 #define CPP_PREDEFINES \
90 "-Dunix -Dlinux -D__ELF__ \
91 -Asystem=unix -Asystem=posix -Acpu=arm -Amachine=arm"
92
93 /* Allow #sccs in preprocessor.  */
94 #define SCCS_DIRECTIVE
95
96 /* This is how we tell the assembler that two symbols have the same value.  */
97 #define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \
98   do                                       \
99     {                                      \
100       assemble_name (FILE, NAME1);         \
101       fputs (" = ", FILE);                 \
102       assemble_name (FILE, NAME2);         \
103       fputc ('\n', FILE);                  \
104     }                                      \
105   while (0)
106
107 /* NWFPE always understands FPA instructions.  */
108 #undef  FP_DEFAULT
109 #define FP_DEFAULT FP_SOFT3
110
111 /* Call the function profiler with a given profile label.  */
112 #undef  ARM_FUNCTION_PROFILER
113 #define ARM_FUNCTION_PROFILER(STREAM, LABELNO)                          \
114 {                                                                       \
115   fprintf (STREAM, "\tbl\tmcount%s\n", NEED_PLT_RELOC ? "(PLT)" : "");  \
116 }
117
118 #undef  CC1_SPEC
119 #define CC1_SPEC "%{profile:-p}"