2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / config / mips / elf64.h
blob1efe51c1646c32e33ba45d461db38b486f58f8a5
1 /* Definitions of target machine for GNU compiler. MIPS R4000 version with
2 GOFAST floating point library.
3 Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2002
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC 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.
13 GCC 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.
18 You should have received a copy of the GNU General Public License
19 along with GCC; 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 #define DWARF2_DEBUGGING_INFO 1
25 #undef PREFERRED_DEBUGGING_TYPE
26 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
28 #undef SUBTARGET_ASM_DEBUGGING_SPEC
29 #define SUBTARGET_ASM_DEBUGGING_SPEC "-g0"
31 /* Biggest alignment supported by the object file format of this
32 machine. Use this macro to limit the alignment which can be
33 specified using the `__attribute__ ((aligned (N)))' construct. If
34 not defined, the default value is `BIGGEST_ALIGNMENT'. */
36 #undef MAX_OFILE_ALIGNMENT
37 #define MAX_OFILE_ALIGNMENT (32768*8)
39 /* Switch into a generic section. */
40 #undef TARGET_ASM_NAMED_SECTION
41 #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
43 /* The following macro defines the format used to output the second
44 operand of the .type assembler directive. Different svr4 assemblers
45 expect various different forms for this operand. The one given here
46 is just a default. You may need to override it in your machine-
47 specific tm.h file (depending upon the particulars of your assembler). */
49 #define TYPE_OPERAND_FMT "@%s"
51 /* Define the strings used for the special svr4 .type and .size directives.
52 These strings generally do not vary from one system running svr4 to
53 another, but if a given system (e.g. m88k running svr) needs to use
54 different pseudo-op names for these, they may be overridden in the
55 file which includes this one. */
57 #undef TYPE_ASM_OP
58 #undef SIZE_ASM_OP
59 #define TYPE_ASM_OP "\t.type\t"
60 #define SIZE_ASM_OP "\t.size\t"
62 #undef ASM_DECLARE_OBJECT_NAME
63 #define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
65 #undef ASM_FINISH_DECLARE_OBJECT
66 #define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
68 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
69 do { fputc ( '\t', FILE); \
70 assemble_name (FILE, LABEL1); \
71 fputs ( " = ", FILE); \
72 assemble_name (FILE, LABEL2); \
73 fputc ( '\n', FILE); \
74 } while (0)
76 /* Note about .weak vs. .weakext
77 The mips native assemblers support .weakext, but not .weak.
78 mips-elf gas supports .weak, but not .weakext.
79 mips-elf gas has been changed to support both .weak and .weakext,
80 but until that support is generally available, the 'if' below
81 should serve. */
83 #undef ASM_WEAKEN_LABEL
84 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
85 #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
86 do { \
87 if (TARGET_GAS) \
88 fputs ("\t.weak\t", FILE); \
89 else \
90 fputs ("\t.weakext\t", FILE); \
91 assemble_name (FILE, NAME); \
92 if (VALUE) \
93 { \
94 fputc (' ', FILE); \
95 assemble_name (FILE, VALUE); \
96 } \
97 fputc ('\n', FILE); \
98 } while (0)
100 #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
102 /* On elf, we *do* have support for the .init and .fini sections, and we
103 can put stuff in there to be executed before and after `main'. We let
104 crtstuff.c and other files know this by defining the following symbols.
105 The definitions say how to change sections to the .init and .fini
106 sections. This is the same for all known elf assemblers. */
108 #undef INIT_SECTION_ASM_OP
109 #define INIT_SECTION_ASM_OP "\t.section\t.init"
110 #undef FINI_SECTION_ASM_OP
111 #define FINI_SECTION_ASM_OP "\t.section\t.fini"
113 /* Don't set the target flags, this is done by the linker script */
114 #undef LIB_SPEC
115 #define LIB_SPEC ""
117 #undef STARTFILE_SPEC
118 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
120 #undef ENDFILE_SPEC
121 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
123 /* We support #pragma. */
124 #define HANDLE_SYSV_PRAGMA 1