#define LINUX_DEFAULT_ELF
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
output_file_directive (FILE, main_input_filename); \
if (ix86_asm_dialect == ASM_INTEL) \
fputs ("\t.intel_syntax\n", FILE); \
} while (0)
#define TARGET_VERSION fprintf (stderr, " (i386 Linux/ELF)");
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 1
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
#define NO_PROFILE_COUNTERS
#undef MCOUNT_NAME
#define MCOUNT_NAME "mcount"
#undef SUBTARGET_FRAME_POINTER_REQUIRED
#define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
#undef PTRDIFF_TYPE
#define PTRDIFF_TYPE "int"
#undef WCHAR_TYPE
#define WCHAR_TYPE "long int"
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define_std ("linux"); \
builtin_define_std ("unix"); \
builtin_define ("__ELF__"); \
builtin_define ("__gnu_linux__"); \
builtin_assert ("system=posix"); \
if (flag_pic) \
{ \
builtin_define ("__PIC__"); \
builtin_define ("__pic__"); \
} \
} \
while (0)
#undef CPP_SPEC
#ifdef USE_GNULIBC_1
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
#else
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#endif
#undef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
#undef LINK_SPEC
#ifdef USE_GNULIBC_1
#ifndef LINUX_DEFAULT_ELF
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/elf/ld-linux.so.1} \
%{!rpath:-rpath /lib/elf/}} %{static:-static}}}"
#else
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
%{static:-static}}}"
#endif
#else
#define LINK_SPEC "-m elf_i386 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}}"
#endif
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
do { \
if ((LOG) != 0) { \
if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
} \
} while (0)
#endif
#if defined(__PIC__) && defined (USE_GNULIBC_1)
#undef CRT_CALL_STATIC_FUNCTION
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
asm (SECTION_OP "\n\t" \
"call " USER_LABEL_PREFIX #FUNC "\n" \
TEXT_SECTION_ASM_OP "\n\t" \
".extern ___brk_addr\n\t" \
".type ___brk_addr,@object\n\t" \
".extern __environ\n\t" \
".type __environ,@object\n\t" \
".extern atexit\n\t" \
".type atexit,@function");
#endif
#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)
#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" \
\
"addl\t$_GLOBAL_OFFSET_TABLE_+[.-.LPR%=],%0" \
: "=d"(BASE))
#endif
#ifdef IN_LIBGCC2
#ifndef USE_GNULIBC_1
#include <signal.h>
#include <sys/ucontext.h>
#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \
do { \
unsigned char *pc_ = (CONTEXT)->ra; \
struct sigcontext *sc_; \
long new_cfa_; \
\
\
if (*(unsigned short *)(pc_+0) == 0xb858 \
&& *(unsigned int *)(pc_+2) == 119 \
&& *(unsigned short *)(pc_+6) == 0x80cd) \
sc_ = (CONTEXT)->cfa + 4; \
\
else if (*(unsigned char *)(pc_+0) == 0xb8 \
&& *(unsigned int *)(pc_+1) == 173 \
&& *(unsigned short *)(pc_+5) == 0x80cd) \
{ \
struct rt_sigframe { \
int sig; \
struct siginfo *pinfo; \
void *puc; \
struct siginfo info; \
struct ucontext uc; \
} *rt_ = (CONTEXT)->cfa; \
sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext; \
} \
else \
break; \
\
new_cfa_ = sc_->esp; \
(FS)->cfa_how = CFA_REG_OFFSET; \
(FS)->cfa_reg = 4; \
(FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \
\
\
(FS)->regs.reg[0].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[0].loc.offset = (long)&sc_->eax - new_cfa_; \
(FS)->regs.reg[3].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[3].loc.offset = (long)&sc_->ebx - new_cfa_; \
(FS)->regs.reg[1].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[1].loc.offset = (long)&sc_->ecx - new_cfa_; \
(FS)->regs.reg[2].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[2].loc.offset = (long)&sc_->edx - new_cfa_; \
(FS)->regs.reg[6].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[6].loc.offset = (long)&sc_->esi - new_cfa_; \
(FS)->regs.reg[7].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[7].loc.offset = (long)&sc_->edi - new_cfa_; \
(FS)->regs.reg[5].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[5].loc.offset = (long)&sc_->ebp - new_cfa_; \
(FS)->regs.reg[8].how = REG_SAVED_OFFSET; \
(FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_; \
(FS)->retaddr_column = 8; \
goto SUCCESS; \
} while (0)
#endif
#endif