OSDN Git Service

compiler: Move import of Go export data to gcc side of interface.
[pf3gnuchains/gcc-fork.git] / gcc / config / sh / elf.h
1 /* Definitions of target machine for gcc for Renesas / SuperH SH using ELF.
2    Copyright (C) 1996, 1997, 2000, 2001, 2002, 2004, 2005, 2007, 2010
3    Free Software Foundation, Inc.
4    Contributed by Ian Lance Taylor <ian@cygnus.com>.
5
6 This file is part of GCC.
7
8 GCC 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 3, or (at your option)
11 any later version.
12
13 GCC 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 GCC; see the file COPYING3.  If not see
20 <http://www.gnu.org/licenses/>.  */
21
22 /* Let sh.c know this is ELF.  */
23 #undef TARGET_ELF
24 #define TARGET_ELF 1
25
26 /* Generate DWARF2 debugging information and make it the default */
27 #define DWARF2_DEBUGGING_INFO 1
28
29 #undef PREFERRED_DEBUGGING_TYPE
30 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
31
32 /* use a more compact format for line information */
33 #define DWARF2_ASM_LINE_DEBUG_INFO 1
34
35 #undef WCHAR_TYPE
36 /* #define WCHAR_TYPE (TARGET_SH5 ? "int" : "long int") */
37 #define WCHAR_TYPE SH_ELF_WCHAR_TYPE
38    
39 #undef WCHAR_TYPE_SIZE
40 #define WCHAR_TYPE_SIZE 32
41
42
43 /* The prefix to add to user-visible assembler symbols.  */
44
45 #undef LOCAL_LABEL_PREFIX
46 #define LOCAL_LABEL_PREFIX "."
47
48 #undef SIZE_TYPE
49 #define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int")
50
51 #undef PTRDIFF_TYPE
52 #define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int")
53
54 /* Pass -ml and -mrelax to the assembler and linker.  */
55 #undef ASM_SPEC
56 #define ASM_SPEC SH_ASM_SPEC
57
58 #undef LINK_SPEC
59 #define LINK_SPEC SH_LINK_SPEC
60 #undef LINK_EMUL_PREFIX
61 #if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
62 #define LINK_EMUL_PREFIX "sh%{!mb:l}elf"
63 #else
64 #define LINK_EMUL_PREFIX "sh%{ml:l}elf"
65 #endif
66
67 #define DBX_REGISTER_NUMBER(REGNO) SH_DBX_REGISTER_NUMBER (REGNO)
68
69 #undef ASM_GENERATE_INTERNAL_LABEL
70 #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
71   sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
72
73 #define DBX_LINES_FUNCTION_RELATIVE 1
74 #define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
75
76 #undef STARTFILE_SPEC
77 #define STARTFILE_SPEC \
78   "%{!shared: crt1.o%s} crti.o%s \
79    %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
80
81 #undef ENDFILE_SPEC
82 #define ENDFILE_SPEC \
83   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
84
85 #undef LIB_SPEC
86 #define LIB_SPEC "-lc"
87
88 /* ASM_OUTPUT_CASE_LABEL is defined in elfos.h.  With it,
89    a redundant .align was generated.  */
90 #undef  ASM_OUTPUT_CASE_LABEL