annotate gcc/config/nios2/elf.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions of ELF target support for Altera Nios II.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2012-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by Jonah Graham (jgraham@altera.com),
kono
parents:
diff changeset
4 Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com).
kono
parents:
diff changeset
5 Contributed by Mentor Graphics, Inc.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 This file is part of GCC.
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
10 under the terms of the GNU General Public License as published
kono
parents:
diff changeset
11 by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
12 option) any later version.
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
17 License for more details.
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
20 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
21 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 /* Specs to support the additional command-line options for Nios II ELF
kono
parents:
diff changeset
25 toolchains. */
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 /* -msmallc chooses an alternate C library.
kono
parents:
diff changeset
28 -msys-lib= specifies an additional low-level system/hosting library and
kono
parents:
diff changeset
29 is typically used to suck in a library provided by a HAL BSP. */
kono
parents:
diff changeset
30 #undef LIB_SPEC
kono
parents:
diff changeset
31 #define LIB_SPEC \
kono
parents:
diff changeset
32 "--start-group %{msmallc: -lsmallc} %{!msmallc: -lc} -lgcc \
kono
parents:
diff changeset
33 %{msys-lib=*: -l%*} \
kono
parents:
diff changeset
34 --end-group \
kono
parents:
diff changeset
35 "
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 /* Linking with -mhal suppresses inclusion of the GCC-provided crt* begin/end
kono
parents:
diff changeset
38 code. Normally in this case you also link with -msys-crt0= to specify
kono
parents:
diff changeset
39 the startup code provided by the HAL BSP instead. */
kono
parents:
diff changeset
40 #undef STARTFILE_SPEC
kono
parents:
diff changeset
41 #define STARTFILE_SPEC \
kono
parents:
diff changeset
42 "%{mhal:" \
kono
parents:
diff changeset
43 "%{msys-crt0=*:%*} %{!msys-crt0=*:crt0%O%s} " \
kono
parents:
diff changeset
44 "%{msys-crt0=:%eYou need a C startup file for -msys-crt0=};" \
kono
parents:
diff changeset
45 ":crti%O%s crtbegin%O%s}"
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 #undef ENDFILE_SPEC
kono
parents:
diff changeset
48 #define ENDFILE_SPEC "%{!mhal:crtend%O%s crtn%O%s}"
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 /* The ELF target doesn't support the Nios II Linux ABI. */
kono
parents:
diff changeset
51 #define TARGET_LINUX_ABI 0
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 /* Default -fdelete-null-pointer-checks to off, to prevent the compiler
kono
parents:
diff changeset
54 from treating accesses to address zero as traps. On bare-metal Nios II
kono
parents:
diff changeset
55 targets address zero may legitimately be mapped to memory (e.g., the
kono
parents:
diff changeset
56 hardware description may specify this as the address of the interrupt
kono
parents:
diff changeset
57 vector). Users can override this on the command line to get the
kono
parents:
diff changeset
58 additional optimizations it enables. */
kono
parents:
diff changeset
59 #define SUBTARGET_OVERRIDE_OPTIONS \
kono
parents:
diff changeset
60 if (flag_delete_null_pointer_checks < 0) \
kono
parents:
diff changeset
61 flag_delete_null_pointer_checks = 0