]>
Commit | Line | Data |
---|---|---|
ef78c245 | 1 | /* Definitions for Intel 386 running Linux-based GNU systems with ELF format. |
4592bdcb JL |
2 | Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 |
3 | Free Software Foundation, Inc. | |
ef78c245 JL |
4 | Contributed by Eric Youngdale. |
5 | Modified for stabs-in-ELF by H.J. Lu. | |
6 | ||
7 | This file is part of GNU CC. | |
8 | ||
9 | GNU CC is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
11 | the Free Software Foundation; either version 2, or (at your option) | |
12 | any later version. | |
13 | ||
14 | GNU CC is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
20 | along with GNU CC; see the file COPYING. If not, write to | |
21 | the Free Software Foundation, 59 Temple Place - Suite 330, | |
22 | Boston, MA 02111-1307, USA. */ | |
23 | ||
24 | #define LINUX_DEFAULT_ELF | |
25 | ||
26 | /* A lie, I guess, but the general idea behind linux/ELF is that we are | |
27 | supposed to be outputting something that will assemble under SVr4. | |
28 | This gets us pretty close. */ | |
29 | #include <i386/i386.h> /* Base i386 target machine definitions */ | |
30 | #include <i386/att.h> /* Use the i386 AT&T assembler syntax */ | |
31 | #include <linux.h> /* some common stuff */ | |
32 | ||
33 | #undef TARGET_VERSION | |
34 | #define TARGET_VERSION fprintf (stderr, " (i386 RTEMS with ELF)"); | |
35 | ||
36 | /* The svr4 ABI for the i386 says that records and unions are returned | |
37 | in memory. */ | |
38 | #undef DEFAULT_PCC_STRUCT_RETURN | |
39 | #define DEFAULT_PCC_STRUCT_RETURN 1 | |
40 | ||
41 | /* This is how to output an element of a case-vector that is relative. | |
42 | This is only used for PIC code. See comments by the `casesi' insn in | |
43 | i386.md for an explanation of the expression this outputs. */ | |
44 | #undef ASM_OUTPUT_ADDR_DIFF_ELT | |
b098f56d | 45 | #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ |
ef78c245 JL |
46 | fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) |
47 | ||
48 | /* Indicate that jump tables go in the text section. This is | |
49 | necessary when compiling PIC code. */ | |
b098f56d | 50 | #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) |
ef78c245 | 51 | |
ef78c245 | 52 | #undef DBX_REGISTER_NUMBER |
83774849 | 53 | #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] |
ef78c245 JL |
54 | |
55 | /* Output assembler code to FILE to increment profiler label # LABELNO | |
56 | for profiling a function entry. */ | |
57 | ||
58 | #undef FUNCTION_PROFILER | |
59 | #define FUNCTION_PROFILER(FILE, LABELNO) \ | |
60 | { \ | |
61 | if (flag_pic) \ | |
62 | { \ | |
63 | fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ | |
64 | LPREFIX, (LABELNO)); \ | |
65 | fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ | |
66 | } \ | |
67 | else \ | |
68 | { \ | |
69 | fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ | |
70 | fprintf (FILE, "\tcall mcount\n"); \ | |
71 | } \ | |
72 | } | |
73 | ||
74 | #undef SIZE_TYPE | |
75 | #define SIZE_TYPE "unsigned int" | |
76 | ||
77 | #undef PTRDIFF_TYPE | |
78 | #define PTRDIFF_TYPE "int" | |
79 | ||
80 | #undef WCHAR_TYPE | |
81 | #define WCHAR_TYPE "long int" | |
82 | ||
83 | #undef WCHAR_TYPE_SIZE | |
84 | #define WCHAR_TYPE_SIZE BITS_PER_WORD | |
85 | ||
86 | #undef CPP_PREDEFINES | |
2b57e919 | 87 | #define CPP_PREDEFINES "-Drtems -D__rtems__ -Asystem=rtems" |
ef78c245 | 88 | |
ef78c245 JL |
89 | /* A C statement (sans semicolon) to output to the stdio stream |
90 | FILE the assembler definition of uninitialized global DECL named | |
91 | NAME whose size is SIZE bytes and alignment is ALIGN bytes. | |
92 | Try to use asm_output_aligned_bss to implement this macro. */ | |
93 | ||
94 | #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ | |
95 | asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) | |
96 | ||
97 | #undef STARTFILE_SPEC | |
d1476635 | 98 | #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s" |
ef78c245 JL |
99 | |
100 | #undef ENDFILE_SPEC | |
d1476635 JS |
101 | #define ENDFILE_SPEC "crtend.o%s crtn.o%s" |
102 | ||
6e5138f0 JS |
103 | /* Get machine-independent configuration parameters for RTEMS. */ |
104 | #include <rtems.h> | |
105 | ||
106 | /* end of i386/rtemself.h */ |