Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / config / arm / unknown-elf.h
blob775e1e9f188128f0bef944bde4279a190891b2b2
1 /* Definitions for non-Linux based ARM systems using ELF
2 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
3 Free Software Foundation, Inc.
4 Contributed by Catherine Moore <clm@cygnus.com>
6 This file is part of GCC.
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
10 by the Free Software Foundation; either version 2, or (at your
11 option) any later version.
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.
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* elfos.h should have already been included. Now just override
24 any conflicting definitions and add any extras. */
26 /* Run-time Target Specification. */
27 #ifndef TARGET_VERSION
28 #define TARGET_VERSION fputs (" (ARM/ELF)", stderr);
29 #endif
31 /* Default to using software floating point. */
32 #ifndef TARGET_DEFAULT
33 #define TARGET_DEFAULT (0)
34 #endif
36 /* Now we define the strings used to build the spec file. */
37 #undef STARTFILE_SPEC
38 #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
40 #undef ENDFILE_SPEC
41 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
43 /* The __USES_INITFINI__ define is tested in newlib/libc/sys/arm/crt0.S
44 to see if it needs to invoked _init() and _fini(). */
45 #undef SUBTARGET_CPP_SPEC
46 #define SUBTARGET_CPP_SPEC "-D__USES_INITFINI__"
48 #undef PREFERRED_DEBUGGING_TYPE
49 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
51 /* Return a nonzero value if DECL has a section attribute. */
52 #define IN_NAMED_SECTION(DECL) \
53 ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \
54 && DECL_SECTION_NAME (DECL) != NULL_TREE)
56 #undef ASM_OUTPUT_ALIGNED_BSS
57 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
58 do \
59 { \
60 if (IN_NAMED_SECTION (DECL)) \
61 named_section (DECL, NULL, 0); \
62 else \
63 bss_section (); \
65 ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
67 last_assemble_variable_decl = DECL; \
68 ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \
69 ASM_OUTPUT_SKIP (FILE, SIZE ? (int)(SIZE) : 1); \
70 } \
71 while (0)
73 #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
74 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
75 do \
76 { \
77 if ((DECL) != NULL && IN_NAMED_SECTION (DECL)) \
78 named_section (DECL, NULL, 0); \
79 else \
80 bss_section (); \
82 ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \
83 ASM_OUTPUT_LABEL (FILE, NAME); \
84 fprintf (FILE, "\t.space\t%d\n", SIZE ? (int)(SIZE) : 1); \
85 } \
86 while (0)
88 #ifndef SUBTARGET_CPU_DEFAULT
89 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi
90 #endif