OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / config / linux.h
1 /* Definitions for Linux with ELF format
2    Copyright (C) 1995 Free Software Foundation, Inc.
3    Contributed by Eric Youngdale.
4    Modified for stabs-in-ELF by H.J. Lu.
5
6 This file is part of GNU CC.
7
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING.  If not, write to
20 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
21
22 /* Don't assume anything about the header files. */
23 #define NO_IMPLICIT_EXTERN_C
24
25 #undef HAVE_ATEXIT
26 #define HAVE_ATEXIT
27
28 /* Linux uses ctype from glibc.a. I am not sure how complete it is.
29    For now, we play safe. It may change later. */
30
31 #if 0
32 #undef MULTIBYTE_CHARS
33 #define MULTIBYTE_CHARS 1
34 #endif
35
36 /* There are conflicting reports about whether this system uses
37    a different assembler syntax.  wilson@cygnus.com says # is right.  */
38 #undef COMMENT_BEGIN
39 #define COMMENT_BEGIN "#"
40
41 #undef ASM_APP_ON
42 #define ASM_APP_ON "#APP\n"
43
44 #undef ASM_APP_OFF
45 #define ASM_APP_OFF "#NO_APP\n"
46
47 /* Use stabs instead of DWARF debug format.  */
48 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
49 #include "svr4.h"
50
51 #undef MD_EXEC_PREFIX
52 #undef MD_STARTFILE_PREFIX
53
54 /* Output at beginning of assembler file.  */
55 /* The .file command should always begin the output.  */
56 #undef ASM_FILE_START
57 #define ASM_FILE_START(FILE)                                            \
58   do {                                                                  \
59         output_file_directive (FILE, main_input_filename);              \
60         fprintf (FILE, "\t.version\t\"01.01\"\n");                      \
61   } while (0)
62
63 #undef  LIBGCC_SPEC
64 #define LIBGCC_SPEC \
65   "%{!shared:-lgcc}"
66
67
68 /* Provide a STARTFILE_SPEC appropriate for Linux.  Here we add
69    the Linux magical crtbegin.o file (see crtstuff.c) which
70    provides part of the support for getting C++ file-scope static
71    object constructed before entering `main'. */
72    
73 #undef  STARTFILE_SPEC
74 #define STARTFILE_SPEC \
75   "%{!shared: \
76      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
77    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
78
79 /* Provide a ENDFILE_SPEC appropriate for Linux.  Here we tack on
80    the Linux magical crtend.o file (see crtstuff.c) which
81    provides part of the support for getting C++ file-scope static
82    object constructed before entering `main', followed by a normal
83    Linux "finalizer" file, `crtn.o'.  */
84
85 #undef  ENDFILE_SPEC
86 #define ENDFILE_SPEC \
87   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"