OSDN Git Service

* system.h (SELECT_RTX_SECTION): Poison.
[pf3gnuchains/gcc-fork.git] / gcc / config / xtensa / elf.h
1 /* Xtensa/Elf configuration.
2    Derived from the configuration for GCC for Intel i386 running Linux.
3    Copyright (C) 2001 Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22 /* Don't assume anything about the header files. */
23 #define NO_IMPLICIT_EXTERN_C
24
25 #undef ASM_APP_ON
26 #define ASM_APP_ON "#APP\n"
27
28 #undef ASM_APP_OFF
29 #define ASM_APP_OFF "#NO_APP\n"
30
31 #undef MD_EXEC_PREFIX
32 #undef MD_STARTFILE_PREFIX
33
34 #undef TARGET_VERSION
35 #define TARGET_VERSION fputs (" (Xtensa/ELF)", stderr);
36
37 #undef SIZE_TYPE
38 #define SIZE_TYPE "unsigned int"
39
40 #undef PTRDIFF_TYPE
41 #define PTRDIFF_TYPE "int"
42
43 #undef WCHAR_TYPE
44 #define WCHAR_TYPE "int"
45
46 #undef WCHAR_TYPE_SIZE
47 #define WCHAR_TYPE_SIZE BITS_PER_WORD
48
49 #undef ASM_SPEC
50 #define ASM_SPEC "%{v} %{mno-density:--no-density} \
51                   %{mtext-section-literals:--text-section-literals} \
52                   %{mno-text-section-literals:--no-text-section-literals} \
53                   %{mtarget-align:--target-align} \
54                   %{mno-target-align:--no-target-align} \
55                   %{mlongcalls:--longcalls} \
56                   %{mno-longcalls:--no-longcalls}"
57
58 #undef ASM_FINAL_SPEC
59
60 #undef LIB_SPEC
61 #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim"
62
63 #undef STARTFILE_SPEC
64 #define STARTFILE_SPEC "crt1-sim%O%s crti%O%s crtbegin%O%s _vectors%O%s"
65
66 #undef ENDFILE_SPEC
67 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"  
68
69 #undef LINK_SPEC
70 #define LINK_SPEC \
71  "%{shared:-shared} \
72   %{!shared: \
73     %{!static: \
74       %{rdynamic:-export-dynamic} \
75     %{static:-static}}}"
76
77 #undef CPP_PREDEFINES
78 #define CPP_PREDEFINES "-D__XTENSA__ -D__ELF__ -Acpu=xtensa -Amachine=xtensa"
79
80 /* Local compiler-generated symbols must have a prefix that the assembler
81    understands.   By default, this is $, although some targets (e.g.,
82    NetBSD-ELF) need to override this. */
83
84 #ifndef LOCAL_LABEL_PREFIX
85 #define LOCAL_LABEL_PREFIX      "."
86 #endif
87
88 /* By default, external symbols do not have an underscore prepended. */
89
90 #ifndef USER_LABEL_PREFIX
91 #define USER_LABEL_PREFIX       ""
92 #endif
93
94 /* Define this macro if the assembler does not accept the character
95    "." in label names.  By default constructors and destructors in G++
96    have names that use ".".  If this macro is defined, these names
97    are rewritten to avoid ".". */
98 #define NO_DOT_IN_LABEL
99
100 /* Define NO_DOLLAR_IN_LABEL in your favorite tm file if your assembler
101    doesn't allow $ in symbol names.  */
102 #undef NO_DOLLAR_IN_LABEL
103
104 /* Do not force "-fpic" for this target.  */
105 #define XTENSA_ALWAYS_PIC 0
106
107 /* Redefine the standard ELF version of ASM_DECLARE_FUNCTION_SIZE to
108    allow adding the ".end literal_prefix" directive at the end of the
109    function.  */
110 #undef ASM_DECLARE_FUNCTION_SIZE
111 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)            \
112   do                                                            \
113     {                                                           \
114       if (!flag_inhibit_size_directive)                         \
115         {                                                       \
116           char label[256];                                      \
117           static int labelno;                                   \
118                                                                 \
119           labelno++;                                            \
120                                                                 \
121           ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno);  \
122           ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno);     \
123                                                                 \
124           fprintf (FILE, "%s", SIZE_ASM_OP);                    \
125           assemble_name (FILE, (FNAME));                        \
126           fprintf (FILE, ",");                                  \
127           assemble_name (FILE, label);                          \
128           fprintf (FILE, "-");                                  \
129           assemble_name (FILE, (FNAME));                        \
130           putc ('\n', FILE);                                    \
131         }                                                       \
132       XTENSA_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL);          \
133     }                                                           \
134   while (0)