]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/i386/i386elf.h
host-hpux.c: Change copyright header to refer to version 3 of the GNU General Public...
[thirdparty/gcc.git] / gcc / config / i386 / i386elf.h
CommitLineData
188fc5b5 1/* Target definitions for GCC for Intel 80386 using ELF
2f83c7d6 2 Copyright (C) 1988, 1991, 1995, 2000, 2001, 2002, 2007
39ed301b 3 Free Software Foundation, Inc.
9b5c756a
JL
4
5 Derived from sysv4.h written by Ron Guilmette (rfg@netcom.com).
6
188fc5b5 7This file is part of GCC.
9b5c756a 8
188fc5b5 9GCC is free software; you can redistribute it and/or modify
9b5c756a 10it under the terms of the GNU General Public License as published by
2f83c7d6 11the Free Software Foundation; either version 3, or (at your option)
9b5c756a
JL
12any later version.
13
188fc5b5 14GCC is distributed in the hope that it will be useful,
9b5c756a
JL
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
18
19You should have received a copy of the GNU General Public License
2f83c7d6
NC
20along with GCC; see the file COPYING3. If not see
21<http://www.gnu.org/licenses/>. */
9b5c756a
JL
22
23/* Use stabs instead of DWARF debug format. */
f6e0c56c 24#undef PREFERRED_DEBUGGING_TYPE
9b5c756a
JL
25#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
26
9b5c756a
JL
27#define TARGET_VERSION fprintf (stderr, " (i386 bare ELF target)");
28
db80ee8e 29/* The ELF ABI for the i386 says that records and unions are returned
9b5c756a
JL
30 in memory. */
31
32#undef RETURN_IN_MEMORY
33#define RETURN_IN_MEMORY(TYPE) \
a7180f70
BS
34 (TYPE_MODE (TYPE) == BLKmode \
35 || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8))
9b5c756a 36
9b5c756a 37#undef CPP_SPEC
1ba7b414 38#define CPP_SPEC ""
9b5c756a 39
aa97fdf3
DB
40#define ENDFILE_SPEC "crtend.o%s"
41
42#define STARTFILE_SPEC "%{!shared: \
43 %{!symbolic: \
44 %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}\
45 crtbegin.o%s"
46
9b5c756a 47#undef DBX_REGISTER_NUMBER
0f7fa3d0
JH
48#define DBX_REGISTER_NUMBER(n) \
49 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
9b5c756a
JL
50
51/* The routine used to output sequences of byte values. We use a special
52 version of this for most svr4 targets because doing so makes the
53 generated assembly code more compact (and thus faster to assemble)
54 as well as more readable. Note that if we find subparts of the
55 character sequence which end with NUL (and which are shorter than
56 STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */
57
58#undef ASM_OUTPUT_ASCII
59#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
60 do \
61 { \
8d531ab9 62 const unsigned char *_ascii_bytes = \
3cce094d 63 (const unsigned char *) (STR); \
8d531ab9
KH
64 const unsigned char *limit = _ascii_bytes + (LENGTH); \
65 unsigned bytes_in_chunk = 0; \
9b5c756a
JL
66 for (; _ascii_bytes < limit; _ascii_bytes++) \
67 { \
8d531ab9 68 const unsigned char *p; \
9b5c756a
JL
69 if (bytes_in_chunk >= 64) \
70 { \
71 fputc ('\n', (FILE)); \
72 bytes_in_chunk = 0; \
73 } \
74 for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
75 continue; \
9d955c3a 76 if (p < limit && (p - _ascii_bytes) <= (long) STRING_LIMIT) \
9b5c756a
JL
77 { \
78 if (bytes_in_chunk > 0) \
79 { \
80 fputc ('\n', (FILE)); \
81 bytes_in_chunk = 0; \
82 } \
83 ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \
84 _ascii_bytes = p; \
85 } \
86 else \
87 { \
88 if (bytes_in_chunk == 0) \
89 fprintf ((FILE), "\t.byte\t"); \
90 else \
91 fputc (',', (FILE)); \
92 fprintf ((FILE), "0x%02x", *_ascii_bytes); \
93 bytes_in_chunk += 5; \
94 } \
95 } \
96 if (bytes_in_chunk > 0) \
97 fprintf ((FILE), "\n"); \
98 } \
99 while (0)
100
9b5c756a
JL
101#define LOCAL_LABEL_PREFIX "."
102
7c262518
RH
103/* Switch into a generic section. */
104#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
9b5c756a
JL
105
106/* If defined, a C expression whose value is a string containing the
107 assembler operation to identify the following data as
108 uninitialized global data. If not defined, and neither
109 `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined,
110 uninitialized global data will be output in the data section if
111 `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be
112 used. */
113#undef BSS_SECTION_ASM_OP
71d48a01 114#define BSS_SECTION_ASM_OP "\t.section\t.bss"
9b5c756a
JL
115
116/* Like `ASM_OUTPUT_BSS' except takes the required alignment as a
117 separate, explicit argument. If you define this macro, it is used
118 in place of `ASM_OUTPUT_BSS', and gives you more flexibility in
119 handling the required alignment of the variable. The alignment is
120 specified as the number of bits.
121
122 Try to use function `asm_output_aligned_bss' defined in file
892a2d68 123 `varasm.c' when defining this macro. */
9b5c756a
JL
124#undef ASM_OUTPUT_ALIGNED_BSS
125#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
126 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)