aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/config/nios2/elf.h
blob: 357bf3ee8db5f8c00e251e03b8c71f94bf2d114c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* Definitions of ELF target support for Altera Nios II.
   Copyright (C) 2012-2014 Free Software Foundation, Inc.
   Contributed by Jonah Graham (jgraham@altera.com), 
   Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com).
   Contributed by Mentor Graphics, Inc.

   This file is part of GCC.

   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3, or (at your
   option) any later version.

   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.

   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */


/* Specs to support the additional command-line options for Nios II ELF
   toolchains.  */

/* -msmallc chooses an alternate C library.
   -msys-lib= specifies an additional low-level system/hosting library and
   is typically used to suck in a library provided by a HAL BSP.  */
#undef LIB_SPEC
#define LIB_SPEC \
"--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
 %{msys-lib=*: -l%*} \
 --end-group \
"

/* Linking with -mhal suppresses inclusion of the GCC-provided crt* begin/end
   code.  Normally in this case you also link with -msys-crt0= to specify
   the startup code provided by the HAL BSP instead.  */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC						\
  "%{mhal:"							\
  "%{msys-crt0=*:%*} %{!msys-crt0=*:crt0%O%s} "			\
  "%{msys-crt0=:%eYou need a C startup file for -msys-crt0=};"	\
  ":crti%O%s crtbegin%O%s}"

#undef  ENDFILE_SPEC
#define ENDFILE_SPEC "%{!mhal:crtend%O%s crtn%O%s}"

/* The ELF target doesn't support the Nios II Linux ABI.  */
#define TARGET_LINUX_ABI 0