]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/sh/elf.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / sh / elf.h
CommitLineData
7b23765d 1/* Definitions of target machine for gcc for Renesas / SuperH SH using ELF.
f1717362 2 Copyright (C) 1996-2016 Free Software Foundation, Inc.
f2f24c3b 3 Contributed by Ian Lance Taylor <ian@cygnus.com>.
4
187b36cf 5This file is part of GCC.
f2f24c3b 6
187b36cf 7GCC is free software; you can redistribute it and/or modify
f2f24c3b 8it under the terms of the GNU General Public License as published by
038d1e19 9the Free Software Foundation; either version 3, or (at your option)
f2f24c3b 10any later version.
11
187b36cf 12GCC is distributed in the hope that it will be useful,
f2f24c3b 13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
038d1e19 18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
f2f24c3b 20
92c473b8 21/* Let sh.c know this is ELF. */
22#undef TARGET_ELF
23#define TARGET_ELF 1
24
6c049e03 25/* Generate DWARF2 debugging information and make it the default. */
277773bd 26#define DWARF2_DEBUGGING_INFO 1
27
28#undef PREFERRED_DEBUGGING_TYPE
29#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
30
6c049e03 31/* Use a more compact format for line information. */
277773bd 32#define DWARF2_ASM_LINE_DEBUG_INFO 1
33
3f67d569 34#undef WCHAR_TYPE
6c049e03 35/* #define WCHAR_TYPE (TARGET_SH5 ? "int" : "long int") */
3f67d569 36#define WCHAR_TYPE SH_ELF_WCHAR_TYPE
37
38#undef WCHAR_TYPE_SIZE
39#define WCHAR_TYPE_SIZE 32
87e19636 40
8ded0752 41
3f67d569 42/* The prefix to add to user-visible assembler symbols. */
8ded0752 43#undef LOCAL_LABEL_PREFIX
44#define LOCAL_LABEL_PREFIX "."
45
87e19636 46#undef SIZE_TYPE
47#define SIZE_TYPE (TARGET_SH5 ? "long unsigned int" : "unsigned int")
48
49#undef PTRDIFF_TYPE
50#define PTRDIFF_TYPE (TARGET_SH5 ? "long int" : "int")
c999a707 51
f2f24c3b 52/* Pass -ml and -mrelax to the assembler and linker. */
53#undef ASM_SPEC
c999a707 54#define ASM_SPEC SH_ASM_SPEC
f2f24c3b 55
56#undef LINK_SPEC
87ab0a3d 57#define LINK_SPEC SH_LINK_SPEC
58#undef LINK_EMUL_PREFIX
156fac8b 59#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN
87ab0a3d 60#define LINK_EMUL_PREFIX "sh%{!mb:l}elf"
61#else
62#define LINK_EMUL_PREFIX "sh%{ml:l}elf"
63#endif
f2f24c3b 64
3f67d569 65#define DBX_REGISTER_NUMBER(REGNO) SH_DBX_REGISTER_NUMBER (REGNO)
f2f24c3b 66
f2f24c3b 67#undef ASM_GENERATE_INTERNAL_LABEL
68#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
b7dbbdb2 69 sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
f2f24c3b 70
e3b8b697 71#define DBX_LINES_FUNCTION_RELATIVE 1
72#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
f2f24c3b 73
0abf894c 74#undef STARTFILE_SPEC
75#define STARTFILE_SPEC \
76 "%{!shared: crt1.o%s} crti.o%s \
77 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
78
79#undef ENDFILE_SPEC
80#define ENDFILE_SPEC \
81 "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
a0c3b6d9 82
9bc320a5 83#undef LIB_SPEC
84#define LIB_SPEC "-lc"
85
a0c3b6d9 86/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h. With it,
87 a redundant .align was generated. */
88#undef ASM_OUTPUT_CASE_LABEL