sol2.h revision 122180
1290001Sglebius/* Target definitions for GNU compiler for Intel 80386 running Solaris 2 2290001Sglebius Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 3290001Sglebius Free Software Foundation, Inc. 4290001Sglebius Contributed by Fred Fish (fnf@cygnus.com). 5290001Sglebius 6290001SglebiusThis file is part of GNU CC. 7290001Sglebius 8290001SglebiusGNU CC is free software; you can redistribute it and/or modify 9290001Sglebiusit under the terms of the GNU General Public License as published by 10290001Sglebiusthe Free Software Foundation; either version 2, or (at your option) 11290001Sglebiusany later version. 12290001Sglebius 13290001SglebiusGNU CC is distributed in the hope that it will be useful, 14290001Sglebiusbut WITHOUT ANY WARRANTY; without even the implied warranty of 15290001SglebiusMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16290001SglebiusGNU General Public License for more details. 17290001Sglebius 18290001SglebiusYou should have received a copy of the GNU General Public License 19290001Sglebiusalong with GNU CC; see the file COPYING. If not, write to 20290001Sglebiusthe Free Software Foundation, 59 Temple Place - Suite 330, 21290001SglebiusBoston, MA 02111-1307, USA. */ 22290001Sglebius 23290001Sglebius/* The Solaris 2.0 x86 linker botches alignment of code sections. 24290001Sglebius It tries to align to a 16 byte boundary by padding with 0x00000090 25290001Sglebius ints, rather than 0x90 bytes (nop). This generates trash in the 26290001Sglebius ".init" section since the contribution from crtbegin.o is only 7 27290001Sglebius bytes. The linker pads it to 16 bytes with a single 0x90 byte, and 28290001Sglebius two 0x00000090 ints, which generates a segmentation violation when 29290001Sglebius executed. This macro forces the assembler to do the padding, since 30290001Sglebius it knows what it is doing. */ 31290001Sglebius#define FORCE_CODE_SECTION_ALIGN asm(ALIGN_ASM_OP "16"); 32290001Sglebius 33290001Sglebius/* Select a format to encode pointers in exception handling data. CODE 34290001Sglebius is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is 35290001Sglebius true if the symbol may be affected by dynamic relocations. */ 36290001Sglebius#undef ASM_PREFERRED_EH_DATA_FORMAT 37290001Sglebius#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ 38290001Sglebius (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \ 39290001Sglebius : DW_EH_PE_absptr) 40290001Sglebius 41290001Sglebius/* Solaris 2/Intel as chokes on #line directives. */ 42290001Sglebius#undef CPP_SPEC 43290001Sglebius#define CPP_SPEC "%{.S:-P} %(cpp_subtarget)" 44290001Sglebius 45290001Sglebius/* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler 46290001Sglebius gives many warnings: R_386_32 relocation is used for symbol ".text". */ 47290001Sglebius#undef ASM_SPEC 48290001Sglebius#define ASM_SPEC "\ 49290001Sglebius%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ 50290001Sglebius%(asm_cpu) \ 51290001Sglebius" 52290001Sglebius 53290001Sglebius#define ASM_CPU_SPEC "" 54290001Sglebius 55290001Sglebius#undef SUBTARGET_EXTRA_SPECS 56290001Sglebius#define SUBTARGET_EXTRA_SPECS \ 57290001Sglebius { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \ 58290001Sglebius { "asm_cpu", ASM_CPU_SPEC }, \ 59290001Sglebius { "startfile_arch", STARTFILE_ARCH_SPEC }, \ 60290001Sglebius { "link_arch", LINK_ARCH_SPEC } 61290001Sglebius 62290001Sglebius#undef LOCAL_LABEL_PREFIX 63290001Sglebius#define LOCAL_LABEL_PREFIX "." 64290001Sglebius 65290001Sglebius/* The Solaris assembler does not support .quad. Do not use it. */ 66290001Sglebius#undef ASM_QUAD 67290001Sglebius