2004-01-06 Eric Christopher <echristo@redhat.com>
[official-gcc.git] / gcc / config / mips / elf64.h
blob071f6fa061a3ba136fbad07bd4070b7a8677b5c2
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 /* Biggest alignment supported by the object file format of this
24 machine. Use this macro to limit the alignment which can be
25 specified using the `__attribute__ ((aligned (N)))' construct. If
26 not defined, the default value is `BIGGEST_ALIGNMENT'. */
28 #undef MAX_OFILE_ALIGNMENT
29 #define MAX_OFILE_ALIGNMENT (32768*8)
31 /* Switch into a generic section. */
32 #undef TARGET_ASM_NAMED_SECTION
33 #define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
35 /* The following macro defines the format used to output the second
36 operand of the .type assembler directive. Different svr4 assemblers
37 expect various different forms for this operand. The one given here
38 is just a default. You may need to override it in your machine-
39 specific tm.h file (depending upon the particulars of your assembler). */
41 #define TYPE_OPERAND_FMT "@%s"
43 /* Define the strings used for the special svr4 .type and .size directives.
44 These strings generally do not vary from one system running svr4 to
45 another, but if a given system (e.g. m88k running svr) needs to use
46 different pseudo-op names for these, they may be overridden in the
47 file which includes this one. */
49 #undef TYPE_ASM_OP
50 #undef SIZE_ASM_OP
51 #define TYPE_ASM_OP "\t.type\t"
52 #define SIZE_ASM_OP "\t.size\t"
54 #undef ASM_DECLARE_OBJECT_NAME
55 #define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
57 #undef ASM_FINISH_DECLARE_OBJECT
58 #define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
60 #define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
61 do { fputc ( '\t', FILE); \
62 assemble_name (FILE, LABEL1); \
63 fputs ( " = ", FILE); \
64 assemble_name (FILE, LABEL2); \
65 fputc ( '\n', FILE); \
66 } while (0)
68 /* Note about .weak vs. .weakext
69 The mips native assemblers support .weakext, but not .weak.
70 mips-elf gas supports .weak, but not .weakext.
71 mips-elf gas has been changed to support both .weak and .weakext,
72 but until that support is generally available, the 'if' below
73 should serve. */
75 #undef ASM_WEAKEN_LABEL
76 #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
77 #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
78 do { \
79 if (TARGET_GAS) \
80 fputs ("\t.weak\t", FILE); \
81 else \
82 fputs ("\t.weakext\t", FILE); \
83 assemble_name (FILE, NAME); \
84 if (VALUE) \
85 { \
86 fputc (' ', FILE); \
87 assemble_name (FILE, VALUE); \
88 } \
89 fputc ('\n', FILE); \
90 } while (0)
92 #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
94 /* On elf, we *do* have support for the .init and .fini sections, and we
95 can put stuff in there to be executed before and after `main'. We let
96 crtstuff.c and other files know this by defining the following symbols.
97 The definitions say how to change sections to the .init and .fini
98 sections. This is the same for all known elf assemblers. */
100 #undef INIT_SECTION_ASM_OP
101 #define INIT_SECTION_ASM_OP "\t.section\t.init"
102 #undef FINI_SECTION_ASM_OP
103 #define FINI_SECTION_ASM_OP "\t.section\t.fini"
105 /* Don't set the target flags, this is done by the linker script */
106 #undef LIB_SPEC
107 #define LIB_SPEC ""
109 #undef STARTFILE_SPEC
110 #define STARTFILE_SPEC "crti%O%s crtbegin%O%s"
112 #undef ENDFILE_SPEC
113 #define ENDFILE_SPEC "crtend%O%s crtn%O%s"
115 /* We support #pragma. */
116 #define HANDLE_SYSV_PRAGMA 1