]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/arm/linux-elf.h
Update copyright years in gcc/
[thirdparty/gcc.git] / gcc / config / arm / linux-elf.h
CommitLineData
b355a481 1/* Definitions for ARM running Linux-based GNU systems using ELF
23a5b65a 2 Copyright (C) 1993-2014 Free Software Foundation, Inc.
b355a481
NC
3 Contributed by Philip Blundell <philb@gnu.org>
4
4f448245 5 This file is part of GCC.
b355a481 6
4f448245
NC
7 GCC is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published
2f83c7d6 9 by the Free Software Foundation; either version 3, or (at your
4f448245 10 option) any later version.
b355a481 11
4f448245
NC
12 GCC is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
b355a481 16
4f448245 17 You should have received a copy of the GNU General Public License
2f83c7d6
NC
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
b355a481 20
be393ecf
NC
21/* elfos.h should have already been included. Now just override
22 any conflicting definitions and add any extras. */
23
b355a481 24/* Run-time Target Specification. */
3d8532aa
PB
25#undef TARGET_DEFAULT_FLOAT_ABI
26#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
27
d3a9662c
BF
28/* TARGET_BIG_ENDIAN_DEFAULT is set in
29 config.gcc for big endian configurations. */
30#if TARGET_BIG_ENDIAN_DEFAULT
31#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
32#define TARGET_ENDIAN_OPTION "mbig-endian"
33#define TARGET_LINKER_EMULATION "armelfb_linux"
34#else
35#define TARGET_ENDIAN_DEFAULT 0
36#define TARGET_ENDIAN_OPTION "mlittle-endian"
37#define TARGET_LINKER_EMULATION "armelf_linux"
38#endif
39
be393ecf 40#undef TARGET_DEFAULT
d3a9662c 41#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
be393ecf 42
192c8d78
RE
43#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
44
d3a9662c 45#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
be393ecf 46
f8693faf
MGD
47/* We do not have any MULTILIB_OPTIONS specified, so there are no
48 MULTILIB_DEFAULTS. */
be393ecf 49#undef MULTILIB_DEFAULTS
f5a1b0d2 50
b355a481 51/* Now we define the strings used to build the spec file. */
6975bd2c 52#undef LIB_SPEC
f5a1b0d2 53#define LIB_SPEC \
17772b2a
JJ
54 "%{pthread:-lpthread} \
55 %{shared:-lc} \
56 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
078e19a4 57
5e1b4d5a 58#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
b355a481 59
464aea98 60#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
077fc835 61
43ee6785 62#define LINUX_TARGET_LINK_SPEC "%{h*} \
b355a481
NC
63 %{static:-Bstatic} \
64 %{shared:-shared} \
65 %{symbolic:-Bsymbolic} \
869fefb7
BC
66 %{!static: \
67 %{rdynamic:-export-dynamic} \
68 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
b355a481 69 -X \
d3a9662c 70 %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
b355a481
NC
71 SUBTARGET_EXTRA_LINK_SPEC
72
077fc835
KH
73#undef LINK_SPEC
74#define LINK_SPEC LINUX_TARGET_LINK_SPEC
75
dc316086
PM
76#define TARGET_OS_CPP_BUILTINS() \
77 do \
78 { \
107fd1c1 79 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
dc316086
PM
80 } \
81 while (0)
b355a481 82
b355a481 83/* This is how we tell the assembler that two symbols have the same value. */
be393ecf
NC
84#define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \
85 do \
86 { \
87 assemble_name (FILE, NAME1); \
88 fputs (" = ", FILE); \
89 assemble_name (FILE, NAME2); \
90 fputc ('\n', FILE); \
91 } \
92 while (0)
863ebdad 93
29ad9694 94#undef FPUTYPE_DEFAULT
0be8bd1a 95#define FPUTYPE_DEFAULT "vfp"
e68eda91
PB
96
97/* Call the function profiler with a given profile label. */
d5b7b3ae
RE
98#undef ARM_FUNCTION_PROFILER
99#define ARM_FUNCTION_PROFILER(STREAM, LABELNO) \
e68eda91 100{ \
f92ba6d1
DJ
101 fprintf (STREAM, "\tbl\tmcount%s\n", \
102 (TARGET_ARM && NEED_PLT_RELOC) ? "(PLT)" : ""); \
e68eda91
PB
103}
104
a15900b5 105/* The GNU/Linux profiler clobbers the link register. Make sure the
2fbe6bc2
RE
106 prologue knows to save it. */
107#define PROFILE_HOOK(X) \
c41c1387 108 emit_clobber (gen_rtx_REG (SImode, LR_REGNUM))
2fbe6bc2 109
a15900b5 110/* The GNU/Linux profiler needs a frame pointer. */
e3b5732b 111#define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
978e411f
CD
112
113/* Add .note.GNU-stack. */
114#undef NEED_INDICATE_EXEC_STACK
115#define NEED_INDICATE_EXEC_STACK 1