]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/arm/unknown-elf.h
host-hpux.c: Change copyright header to refer to version 3 of the GNU General Public...
[thirdparty/gcc.git] / gcc / config / arm / unknown-elf.h
CommitLineData
b355a481 1/* Definitions for non-Linux based ARM systems using ELF
2f83c7d6 2 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007
c9280dfe 3 Free Software Foundation, Inc.
b355a481
NC
4 Contributed by Catherine Moore <clm@cygnus.com>
5
4f448245 6 This file is part of GCC.
b355a481 7
4f448245
NC
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
2f83c7d6 10 by the Free Software Foundation; either version 3, or (at your
4f448245 11 option) any later version.
b355a481 12
4f448245
NC
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
b355a481 17
4f448245 18 You should have received a copy of the GNU General Public License
2f83c7d6
NC
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
b355a481 21
be393ecf
NC
22/* elfos.h should have already been included. Now just override
23 any conflicting definitions and add any extras. */
24
b355a481 25/* Run-time Target Specification. */
e6592fff 26#ifndef TARGET_VERSION
7b07d808 27#define TARGET_VERSION fputs (" (ARM/ELF)", stderr);
e6592fff 28#endif
b355a481 29
61f0ccff 30/* Default to using software floating point. */
0122a613 31#ifndef TARGET_DEFAULT
3d8532aa 32#define TARGET_DEFAULT (0)
0122a613 33#endif
b355a481
NC
34
35/* Now we define the strings used to build the spec file. */
be393ecf
NC
36#undef STARTFILE_SPEC
37#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
b355a481 38
be393ecf
NC
39#undef ENDFILE_SPEC
40#define ENDFILE_SPEC "crtend%O%s crtn%O%s"
b355a481 41
be393ecf
NC
42/* The __USES_INITFINI__ define is tested in newlib/libc/sys/arm/crt0.S
43 to see if it needs to invoked _init() and _fini(). */
44#undef SUBTARGET_CPP_SPEC
4e2e315f 45#define SUBTARGET_CPP_SPEC "-D__USES_INITFINI__"
b355a481 46
be393ecf 47#undef PREFERRED_DEBUGGING_TYPE
b355a481
NC
48#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
49
825dda42 50/* Return a nonzero value if DECL has a section attribute. */
a56e7c08
NC
51#define IN_NAMED_SECTION(DECL) \
52 ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \
53 && DECL_SECTION_NAME (DECL) != NULL_TREE)
54
a56e7c08
NC
55#undef ASM_OUTPUT_ALIGNED_BSS
56#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
57 do \
58 { \
59 if (IN_NAMED_SECTION (DECL)) \
d6b5193b 60 switch_to_section (get_named_section (DECL, NULL, 0)); \
a56e7c08 61 else \
d6b5193b 62 switch_to_section (bss_section); \
a56e7c08 63 \
a56e7c08
NC
64 ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
65 \
66 last_assemble_variable_decl = DECL; \
67 ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \
58e15542 68 ASM_OUTPUT_SKIP (FILE, SIZE ? (int)(SIZE) : 1); \
a56e7c08
NC
69 } \
70 while (0)
71
72#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
73#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
74 do \
75 { \
648f5f04 76 if ((DECL) != NULL && IN_NAMED_SECTION (DECL)) \
d6b5193b 77 switch_to_section (get_named_section (DECL, NULL, 0)); \
a56e7c08 78 else \
d6b5193b 79 switch_to_section (bss_section); \
a56e7c08
NC
80 \
81 ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
82 ASM_OUTPUT_LABEL (FILE, NAME); \
58e15542 83 fprintf (FILE, "\t.space\t%d\n", SIZE ? (int)(SIZE) : 1); \
a56e7c08
NC
84 } \
85 while (0)
b355a481 86
0122a613 87#ifndef SUBTARGET_CPU_DEFAULT
b355a481 88#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi
0122a613 89#endif
d5b7b3ae 90
e3fe057d
MM
91/* The libgcc udivmod functions may throw exceptions. If newlib is
92 configured to support long longs in I/O, then printf will depend on
93 udivmoddi4, which will depend on the exception unwind routines,
94 which will depend on abort, which is defined in libc. */
95#undef LINK_GCC_C_SEQUENCE_SPEC
96#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"