00001 /* Target definitions for GCC for Intel 80386 running Solaris 2 00002 Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 00003 2004 00004 Free Software Foundation, Inc. 00005 Contributed by Fred Fish (fnf@cygnus.com). 00006 00007 This file is part of GCC. 00008 00009 GCC is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2, or (at your option) 00012 any later version. 00013 00014 GCC is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with GCC; see the file COPYING. If not, write to 00021 the Free Software Foundation, 59 Temple Place - Suite 330, 00022 Boston, MA 02111-1307, USA. */ 00023 00024 /* The Solaris 2.0 x86 linker botches alignment of code sections. 00025 It tries to align to a 16 byte boundary by padding with 0x00000090 00026 ints, rather than 0x90 bytes (nop). This generates trash in the 00027 ".init" section since the contribution from crtbegin.o is only 7 00028 bytes. The linker pads it to 16 bytes with a single 0x90 byte, and 00029 two 0x00000090 ints, which generates a segmentation violation when 00030 executed. This macro forces the assembler to do the padding, since 00031 it knows what it is doing. */ 00032 #define FORCE_CODE_SECTION_ALIGN asm(ALIGN_ASM_OP "16"); 00033 00034 /* Old versions of the Solaris assembler can not handle the difference of 00035 labels in different sections, so force DW_EH_PE_datarel. */ 00036 #undef ASM_PREFERRED_EH_DATA_FORMAT 00037 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ 00038 (flag_pic ? ((GLOBAL ? DW_EH_PE_indirect : 0) \ 00039 | (TARGET_64BIT ? DW_EH_PE_pcrel | DW_EH_PE_sdata4 \ 00040 : DW_EH_PE_datarel)) \ 00041 : DW_EH_PE_absptr) 00042 00043 /* The Solaris linker will not merge a read-only .eh_frame section 00044 with a read-write .eh_frame section. None of the encodings used 00045 with non-PIC code require runtime relocations. In 64-bit mode, 00046 since there is no backwards compatibility issue, we use a read-only 00047 section for .eh_frame. In 32-bit mode, we use a writable .eh_frame 00048 section in order to be compatible with G++ for Solaris x86. */ 00049 #undef EH_TABLES_CAN_BE_READ_ONLY 00050 #define EH_TABLES_CAN_BE_READ_ONLY (TARGET_64BIT) 00051 00052 /* Solaris 2/Intel as chokes on #line directives. */ 00053 #undef CPP_SPEC 00054 #define CPP_SPEC "%{.S:-P} %(cpp_subtarget)" 00055 00056 /* FIXME: Removed -K PIC from generic Solaris 2 ASM_SPEC: the native assembler 00057 gives many warnings: R_386_32 relocation is used for symbol ".text". */ 00058 #undef ASM_SPEC 00059 #define ASM_SPEC "\ 00060 %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \ 00061 %(asm_cpu) \ 00062 " 00063 00064 #define ASM_CPU_SPEC "" 00065 00066 #undef SUBTARGET_EXTRA_SPECS 00067 #define SUBTARGET_EXTRA_SPECS \ 00068 { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \ 00069 { "asm_cpu", ASM_CPU_SPEC }, \ 00070 { "startfile_arch", STARTFILE_ARCH_SPEC }, \ 00071 { "link_arch", LINK_ARCH_SPEC } 00072 00073 #undef LOCAL_LABEL_PREFIX 00074 #define LOCAL_LABEL_PREFIX "." 00075 00076 /* The 32-bit Solaris assembler does not support .quad. Do not use it. */ 00077 #ifndef TARGET_BI_ARCH 00078 #undef ASM_QUAD 00079 #endif 00080 00081 /* The Solaris assembler wants a .local for non-exported aliases. */ 00082 #define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \ 00083 do { \ 00084 const char *declname = \ 00085 IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ 00086 ASM_OUTPUT_DEF ((FILE), declname, \ 00087 IDENTIFIER_POINTER (TARGET)); \ 00088 if (! TREE_PUBLIC (DECL)) \ 00089 { \ 00090 fprintf ((FILE), "%s", LOCAL_ASM_OP); \ 00091 assemble_name ((FILE), declname); \ 00092 fprintf ((FILE), "\n"); \ 00093 } \ 00094 } while (0) 00095 00096 /* Solaris-specific #pragmas are implemented on top of attributes. Hook in 00097 the bits from config/sol2.c. */ 00098 #define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes 00099 #define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE 00100 00101 /* Output a simple call for .init/.fini. */ 00102 #define ASM_OUTPUT_CALL(FILE, FN) \ 00103 do \ 00104 { \ 00105 fprintf (FILE, "\tcall\t"); \ 00106 print_operand (FILE, XEXP (DECL_RTL (FN), 0), 'P'); \ 00107 fprintf (FILE, "\n"); \ 00108 } \ 00109 while (0) 00110 00111 /* We do not need NT_VERSION notes. */ 00112 #undef X86_FILE_START_VERSION_DIRECTIVE 00113 #define X86_FILE_START_VERSION_DIRECTIVE false
1.5.6