2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / config / i386 / sol2.h
blob40bbf047912e2ef4a5eacd81225b2518acbfca16
1 /* Target definitions for GCC for Intel 80386 running Solaris 2
2 Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
3 Free Software Foundation, Inc.
4 Contributed by Fred Fish (fnf@cygnus.com).
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 /* The Solaris 2.0 x86 linker botches alignment of code sections.
24 It tries to align to a 16 byte boundary by padding with 0x00000090
25 ints, rather than 0x90 bytes (nop). This generates trash in the
26 ".init" section since the contribution from crtbegin.o is only 7
27 bytes. The linker pads it to 16 bytes with a single 0x90 byte, and
28 two 0x00000090 ints, which generates a segmentation violation when
29 executed. This macro forces the assembler to do the padding, since
30 it knows what it is doing. */
31 #define FORCE_CODE_SECTION_ALIGN asm(ALIGN_ASM_OP "16");
33 /* Select a format to encode pointers in exception handling data. CODE
34 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
35 true if the symbol may be affected by dynamic relocations. */
36 #undef ASM_PREFERRED_EH_DATA_FORMAT
37 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
38 (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \
39 : DW_EH_PE_absptr)
41 /* Solaris 2/Intel as chokes on #line directives. */
42 #undef CPP_SPEC
43 #define CPP_SPEC "%{.S:-P} %(cpp_subtarget)"
45 /* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler
46 gives many warnings: R_386_32 relocation is used for symbol ".text". */
47 #undef ASM_SPEC
48 #define ASM_SPEC "\
49 %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
50 %(asm_cpu) \
53 #define ASM_CPU_SPEC ""
55 #undef SUBTARGET_EXTRA_SPECS
56 #define SUBTARGET_EXTRA_SPECS \
57 { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \
58 { "asm_cpu", ASM_CPU_SPEC }, \
59 { "startfile_arch", STARTFILE_ARCH_SPEC }, \
60 { "link_arch", LINK_ARCH_SPEC }
62 #undef LOCAL_LABEL_PREFIX
63 #define LOCAL_LABEL_PREFIX "."
65 /* The Solaris assembler does not support .quad. Do not use it. */
66 #undef ASM_QUAD