?? sco5.h
字號:
#undef DBX_BLOCKS_FUNCTION_RELATIVE#define DBX_BLOCKS_FUNCTION_RELATIVE 1#undef DBX_FUNCTION_FIRST#define DBX_FUNCTION_FIRST 1#undef DBX_REGISTER_NUMBER#define DBX_REGISTER_NUMBER(n) \ ((TARGET_ELF) ? svr4_dbx_register_map[n] : dbx_register_map[n])#define DWARF2_DEBUGGING_INFO 1#define DWARF_DEBUGGING_INFO 1#define SDB_DEBUGGING_INFO 1#define DBX_DEBUGGING_INFO 1#undef PREFERRED_DEBUGGING_TYPE#define PREFERRED_DEBUGGING_TYPE \ ((TARGET_ELF) ? DWARF2_DEBUG: SDB_DEBUG)#undef EXTRA_SECTIONS#define EXTRA_SECTIONS in_init, in_fini#undef EXTRA_SECTION_FUNCTIONS#define EXTRA_SECTION_FUNCTIONS \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION#undef FINI_SECTION_FUNCTION#define FINI_SECTION_FUNCTION \void \fini_section () \{ \ if ((!TARGET_ELF) && in_section != in_fini) \ { \ fprintf (asm_out_file, "%s\n", FINI_SECTION_ASM_OP); \ in_section = in_fini; \ } \}#undef INIT_SECTION_FUNCTION#define INIT_SECTION_FUNCTION \void \init_section () \{ \ if ((!TARGET_ELF) && in_section != in_init) \ { \ fprintf (asm_out_file, "%s\n", INIT_SECTION_ASM_OP); \ in_section = in_init; \ } \}#undef SUBTARGET_FRAME_POINTER_REQUIRED#define SUBTARGET_FRAME_POINTER_REQUIRED \ ((TARGET_ELF) ? 0 : \ (current_function_calls_setjmp || current_function_calls_longjmp))#undef LOCAL_LABEL_PREFIX#define LOCAL_LABEL_PREFIX \ ((TARGET_ELF) ? "" : ".")#undef MD_EXEC_PREFIX#undef MD_STARTFILE_PREFIX#define MD_EXEC_PREFIX "/usr/ccs/bin/"#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"#undef NON_SAVING_SETJMP#define NON_SAVING_SETJMP \ ((TARGET_ELF) ? 0 : \ (current_function_calls_setjmp && current_function_calls_longjmp))#undef NO_IMPLICIT_EXTERN_C#define NO_IMPLICIT_EXTERN_C 1/* JKJ FIXME - examine the ramifications of RETURN_IN_MEMORY and RETURN_POPS_ARGS */#undef RETURN_POPS_ARGS#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ ((TARGET_ELF) ? \ (ix86_return_pops_args (FUNDECL, FUNTYPE, SIZE)) : \ (((FUNDECL) && (TREE_CODE (FUNDECL) == IDENTIFIER_NODE)) ? 0 \ : (TARGET_RTD \ && (TYPE_ARG_TYPES (FUNTYPE) == 0 \ || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \ == void_type_node))) ? (SIZE) \ : 0))/* ??? Ignore coff. */#undef TARGET_ASM_SELECT_SECTION#define TARGET_ASM_SELECT_SECTION default_elf_select_section#undef SWITCH_TAKES_ARG#define SWITCH_TAKES_ARG(CHAR) \ (DEFAULT_SWITCH_TAKES_ARG(CHAR) \ || (CHAR) == 'h' \ || (CHAR) == 'R' \ || (CHAR) == 'Y' \ || (CHAR) == 'z')#undef WORD_SWITCH_TAKES_ARG#define WORD_SWITCH_TAKES_ARG(STR) \ (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ && strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \ && strcmp (STR, "Tbss"))#undef TARGET_SUBTARGET_DEFAULT#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS)#define HANDLE_SYSV_PRAGMA 1/* Though OpenServer supports .weak in COFF, we don't use it. * G++ will frequently emit a symol as .weak and then (in the same .s * file) declare it global. The COFF assembler finds this unamusing. */#define SUPPORTS_WEAK (TARGET_ELF)#define ASM_WEAKEN_LABEL(FILE,NAME) \ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ fputc ('\n', FILE); } while (0)/* * Define sizes and types */#undef SIZE_TYPE#undef PTRDIFF_TYPE#undef WCHAR_TYPE#undef WCHAR_TYPE_SIZE#undef LONG_DOUBLE_TYPE_SIZE#define LONG_DOUBLE_TYPE_SIZE 96#define SIZE_TYPE "unsigned int"#define PTRDIFF_TYPE "int"#define WCHAR_TYPE "long int"#define WCHAR_TYPE_SIZE BITS_PER_WORD/* * New for multilib support. Set the default switches for multilib, * which is -melf. */#define MULTILIB_DEFAULTS { "melf" }/* Please note that these specs may look messy but they are required in order to emulate the SCO Development system as closely as possible. With SCO Open Server 5.0, you now get the linker and assembler free, so that is what these specs are targeted for. These utilities are very argument sensitive: a space in the wrong place breaks everything. So RMS, please forgive this mess. It works. Parameters which can be passed to gcc, and their SCO equivalents: GCC Parameter SCO Equivalent -ansi -a ansi -posix -a posix -Xpg4 -a xpg4 -Xpg4plus -a xpg4plus -Xods30 -a ods30 As with SCO, the default is XPG4 plus mode. SCO also allows you to specify a C dialect with -Xt, -Xa, -Xc, -Xk and -Xm. These are passed on to the assembler and linker in the same way that the SCO compiler does. SCO also allows you to compile, link and generate either ELF or COFF binaries. With gcc, unlike the SCO compiler, the default is ELF. Specify -mcoff to gcc to produce COFF binaries. -fpic will get the assembler and linker to produce PIC code.*//* Set up assembler flags for PIC and ELF compilations */#undef ASM_SPEC#if USE_GAS /* Leave ASM_SPEC undefined so we pick up the master copy from gcc.c * Undef MD_EXEC_PREFIX because we don't know where GAS is, but it's not * likely in /usr/ccs/bin/ */#undef MD_EXEC_PREFIX #else#define ASM_SPEC \ "-b %{!mcoff:elf}%{mcoff:coff \ %{static:%e-static not valid with -mcoff} \ %{shared:%e-shared not valid with -mcoff} \ %{symbolic:%e-symbolic not valid with -mcoff}} \ %{Ym,*} %{Yd,*} %{Wa,*:%*} \ %{!mcoff:-E%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},ELF %{Qn:} %{!Qy:-Qn}}"#endif/* Use crt1.o as a startup file and crtn.o as a closing file. */#undef STARTFILE_SPEC#define STARTFILE_SPEC \ "%{shared: %{!mcoff: crti.o%s}} \ %{!shared:\ %{!symbolic: \ %{pg:gcrt.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}} \ %{ansi:values-Xc.o%s} \ %{!ansi: \ %{Xa:values-Xa.o%s} \ %{!Xa:%{Xc:values-Xc.o%s} \ %{!Xc:%{Xk:values-Xk.o%s} \ %{!Xk:%{Xt:values-Xt.o%s} \ %{!Xt:values-Xa.o%s}}}}} \ %{mcoff:crtbeginS.o%s} %{!mcoff:crtbegin.o%s}"#undef ENDFILE_SPEC#define ENDFILE_SPEC \ "%{!mcoff:crtend.o%s} \ %{mcoff:crtendS.o%s} \ %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"#define TARGET_OS_CPP_BUILTINS() \ do \ { \ builtin_define ("__unix"); \ builtin_define ("_SCO_DS"); \ builtin_define ("_M_I386"); \ builtin_define ("_M_XENIX"); \ builtin_define ("_M_UNIX"); \ builtin_assert ("system=svr3"); \ if (flag_iso) \ cpp_define (pfile, "_STRICT_ANSI"); \ if (flag_pic) \ { \ builtin_define ("__PIC__"); \ builtin_define ("__pic__"); \ } \ } \ while (0)#undef CPP_SPEC#define CPP_SPEC "\ %{fpic:%{mcoff:%e-fpic is not valid with -mcoff}} \ %{fPIC:%{mcoff:%e-fPIC is not valid with -mcoff}} \ %{!Xods30:-D_STRICT_NAMES} \ %{!ansi:%{!posix:%{!Xods30:-D_SCO_XPG_VERS=4}}} \ %{ansi:-isystem include/ansi%s -isystem /usr/include/ansi} \ %{!ansi: \ %{posix:-isystem include/posix%s -isystem /usr/include/posix \ -D_POSIX_C_SOURCE=2 -D_POSIX_SOURCE=1} \ %{!posix:%{Xpg4:-isystem include/xpg4%s -isystem /usr/include/xpg4 \ -D_XOPEN_SOURCE=1} \ %{!Xpg4:-D_M_I86 -D_M_I86SM -D_M_INTERNAT -D_M_SDATA -D_M_STEXT \ -D_M_BITFIELDS -D_M_SYS5 -D_M_SYSV -D_M_SYSIII \ -D_M_WORDSWAP -Dunix -DM_I386 -DM_UNIX -DM_XENIX \ %{Xods30:-isystem include/ods_30_compat%s \ -isystem /usr/include/ods_30_compat \ -D_SCO_ODS_30 -DM_I86 -DM_I86SM -DM_SDATA -DM_STEXT \ -DM_BITFIELDS -DM_SYS5 -DM_SYSV -DM_INTERNAT -DM_SYSIII \ -DM_WORDSWAP}}}} \ %{scointl:-DM_INTERNAT -D_M_INTERNAT} \ %{!mcoff:-D_SCO_ELF} \ %{mcoff:-D_M_COFF -D_SCO_COFF} \ %{Xa:-D_SCO_C_DIALECT=1} \ %{!Xa:%{Xc:-D_SCO_C_DIALECT=3} \ %{!Xc:%{Xk:-D_SCO_C_DIALECT=4} \ %{!Xk:%{Xt:-D_SCO_C_DIALECT=2} \ %{!Xt:-D_SCO_C_DIALECT=1}}}}"#undef LINK_SPEC#define LINK_SPEC \ "-b %{!mcoff:elf}%{mcoff:coff \ %{static:%e-static not valid with -mcoff} \ %{shared:%e-shared not valid with -mcoff} \ %{symbolic:%e-symbolic not valid with -mcoff} \ %{fpic:%e-fpic not valid with -mcoff} \ %{fPIC:%e-fPIC not valid with -mcoff}} \ -R%{Xa:a}%{!Xa:%{Xc:c}%{!Xc:%{Xk:k}%{!Xk:%{Xt:t}%{!Xt:a}}}},%{ansi:ansi}%{!ansi:%{posix:posix}%{!posix:%{Xpg4:xpg4}%{!Xpg4:%{Xpg4plus:XPG4PLUS}%{!Xpg4plus:%{Xods30:ods30}%{!Xods30:XPG4PLUS}}}}},%{mcoff:COFF}%{!mcoff:ELF} \ %{Wl,*%*} %{YP,*} %{YL,*} %{YU,*} \ %{!YP,*:%{p:-YP,/usr/ccs/libp:/lib/libp:/usr/lib/libp:/usr/ccs/lib:/lib:/usr/lib} \ %{!p:-YP,/usr/ccs/lib:/lib:/usr/lib}} \ %{h*} %{static:-dn -Bstatic} %{shared:-G -dy %{!z*:-z text}} \ %{symbolic:-Bsymbolic -G -dy %{!z*:-z text}} %{z*} %{R*} %{Y*} \ %{G:-G} %{!mcoff:%{Qn:} %{!Qy:-Qn}}"/* The SCO COFF linker gets confused on the difference between "-ofoo" and "-o foo". So we just always force a single space. */#define SWITCHES_NEED_SPACES "o"/* Library spec. If we are not building a shared library, provide the standard libraries, as per the SCO compiler. */#undef LIB_SPEC#define LIB_SPEC \ "%{shared:pic/libgcc.a%s}%{!shared:%{!symbolic:-lcrypt -lgen -lc}}"#undef LIBGCC_SPEC#define LIBGCC_SPEC \ "%{!shared:-lgcc}"#define MASK_COFF 010000000000 /* Mask for elf generation */#define TARGET_ELF (1) /* (!(target_flags & MASK_COFF)) */#undef SUBTARGET_SWITCHES#define SUBTARGET_SWITCHES \ { "elf", -MASK_COFF, N_("Generate ELF output") },#define NO_DOLLAR_IN_LABEL/* Implicit library calls should use memcpy, not bcopy, etc. They are faster on OpenServer libraries. */#define TARGET_MEM_FUNCTIONS/* Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be specified using the `__attribute__ ((aligned (N)))' construct. If not defined, the default value is `BIGGEST_ALIGNMENT'. */#define MAX_OFILE_ALIGNMENT (32768*8)/* Define the `__builtin_va_list' type for the ABI. On OpenServer, this type is `char *'. */#undef BUILD_VA_LIST_TYPE#define BUILD_VA_LIST_TYPE(VALIST) \ (VALIST) = build_pointer_type (char_type_node)/*Here comes some major hackery to get the crt stuff to compile properly.Since we can (and do) compile for both COFF and ELF environments, weset things up accordingly, based on the pre-processor defines for ELFand COFF. This is insane, but then I guess having one compiler with asingle back-end supporting two vastly different file format types isa little insane too. But it is not impossible and we get a usefulcompiler at the end of the day. Onward we go ...*/#if defined(CRT_BEGIN) || defined(CRT_END) || defined(IN_LIBGCC2)# undef OBJECT_FORMAT_ELF# undef INIT_SECTION_ASM_OP# undef FINI_SECTION_ASM_OP# undef CTORS_SECTION_ASM_OP# undef DTORS_SECTION_ASM_OP# undef EH_FRAME_SECTION_NAME# undef CTOR_LIST_BEGIN# undef CTOR_LIST_END# undef DO_GLOBAL_CTORS_BODY# if defined (_SCO_ELF)# define OBJECT_FORMAT_ELF# define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_ELF# define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_ELF# define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_ELF# define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_ELF# define EH_FRAME_SECTION_NAME EH_FRAME_SECTION_NAME_ELF# else /* ! _SCO_ELF */# define INIT_SECTION_ASM_OP INIT_SECTION_ASM_OP_COFF# define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_COFF# define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_COFF# define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_COFF# define EH_FRAME_SECTION_NAME EH_FRAME_SECTION_NAME_COFF# define CTOR_LIST_BEGIN asm (INIT_SECTION_ASM_OP); asm ("pushl $0")# define CTOR_LIST_END CTOR_LIST_BEGIN# define DO_GLOBAL_CTORS_BODY \do { \ func_ptr *p, *beg = alloca(0); \ for (p = beg; *p;) \ (*p++) (); \} while (0)# endif /* ! _SCO_ELF */#endif /* CRT_BEGIN !! CRT_END *//* Handle special EH pointer encodings. Absolute, pc-relative, and indirect are handled automatically. */#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \ do { \ if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \ { \ fputs (ASM_LONG, FILE); \ assemble_name (FILE, XSTR (ADDR, 0)); \ fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \ goto DONE; \ } \ } while (0)/* Used by crtstuff.c to initialize the base of data-relative relocations. These are GOT relative on x86, so return the pic register. */#ifdef __PIC__#define CRT_GET_RFIB_DATA(BASE) \ { \ register void *ebx_ __asm__("ebx"); \ BASE = ebx_; \ }#else#define CRT_GET_RFIB_DATA(BASE) \ __asm__ ("call\t.LPR%=\n" \ ".LPR%=:\n\t" \ "popl\t%0\n\t" \ /* Due to a GAS bug, this cannot use EAX. That encodes \ smaller than the traditional EBX, which results in the \ offset being off by one. */ \ "addl\t$_GLOBAL_OFFSET_TABLE_+[.-.LPR%=],%0" \ : "=d"(BASE))#endif/* Select a format to encode pointers in exception handling data. CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is true if the symbol may be affected by dynamic relocations. */#undef ASM_PREFERRED_EH_DATA_FORMAT#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_datarel \ : DW_EH_PE_absptr)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -