freebsd.h revision 56810
1/* Definitions for Intel 386 running FreeBSD with either a.out or ELF format 2 Copyright (C) 1996 Free Software Foundation, Inc. 3 Contributed by Eric Youngdale. 4 Modified for stabs-in-ELF by H.J. Lu. 5 Adapted from GNU/Linux version by John Polstra. 6 Added support for generating "old a.out gas" on the fly by Peter Wemm. 7 Continued development by David O'Brien <obrien@freebsd.org> 8 9This file is part of GNU CC. 10 11GNU CC is free software; you can redistribute it and/or modify 12it under the terms of the GNU General Public License as published by 13the Free Software Foundation; either version 2, or (at your option) 14any later version. 15 16GNU CC is distributed in the hope that it will be useful, 17but WITHOUT ANY WARRANTY; without even the implied warranty of 18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19GNU General Public License for more details. 20 21You should have received a copy of the GNU General Public License 22along with GNU CC; see the file COPYING. If not, write to 23the Free Software Foundation, 59 Temple Place - Suite 330, 24Boston, MA 02111-1307, USA. */ 25 26/* $FreeBSD: head/contrib/gcc/config/i386/freebsd.h 56810 2000-01-29 13:06:33Z obrien $ */ 27 28 29#undef TARGET_VERSION 30#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); 31 32#define MASK_PROFILER_EPILOGUE 010000000000 33#define MASK_AOUT 004000000000 /* a.out not elf */ 34#define MASK_UNDERSCORES 002000000000 /* use leading _ */ 35 36#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE) 37#define TARGET_AOUT (target_flags & MASK_AOUT) 38#define TARGET_ELF ((target_flags & MASK_AOUT) == 0) 39#define TARGET_UNDERSCORES ((target_flags & MASK_UNDERSCORES) != 0) 40 41#undef SUBTARGET_SWITCHES 42#define SUBTARGET_SWITCHES \ 43 { "profiler-epilogue", MASK_PROFILER_EPILOGUE}, \ 44 { "no-profiler-epilogue", -MASK_PROFILER_EPILOGUE}, \ 45 { "aout", MASK_AOUT}, \ 46 { "no-aout", -MASK_AOUT}, \ 47 { "underscores", MASK_UNDERSCORES}, \ 48 { "no-underscores", -MASK_UNDERSCORES}, 49 50/* Prefix for internally generated assembler labels. If we aren't using 51 underscores, we are using prefix `.'s to identify labels that should 52 be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ 53#undef LPREFIX 54#define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L") 55 56/* Override the default comment-starter of "/". */ 57#undef ASM_COMMENT_START 58#define ASM_COMMENT_START "#" 59 60#undef ASM_APP_ON 61#define ASM_APP_ON "#APP\n" 62 63#undef ASM_APP_OFF 64#define ASM_APP_OFF "#NO_APP\n" 65 66#undef SET_ASM_OP 67#define SET_ASM_OP ".set" 68 69/* Output at beginning of assembler file. */ 70/* The .file command should always begin the output. */ 71 72#undef ASM_FILE_START 73#define ASM_FILE_START(FILE) \ 74 do { \ 75 output_file_directive ((FILE), main_input_filename); \ 76 if (TARGET_ELF) \ 77 fprintf ((FILE), "\t.version\t\"01.01\"\n"); \ 78 } while (0) 79 80/* Identify the front-end which produced this file. To keep symbol 81 space down, and not confuse kdb, only do this if the language is 82 not C. (svr4.h defines ASM_IDENTIFY_GCC but neglects this) */ 83#undef ASM_IDENTIFY_LANGUAGE 84#define ASM_IDENTIFY_LANGUAGE(STREAM) \ 85{ \ 86 if (strcmp (lang_identify (), "c") != 0) \ 87 output_lang_identify (STREAM); \ 88} 89 90/* This is how to store into the string BUF 91 the symbol_ref name of an internal numbered label where 92 PREFIX is the class of label and NUM is the number within the class. 93 This is suitable for output with `assemble_name'. */ 94#undef ASM_GENERATE_INTERNAL_LABEL 95#define ASM_GENERATE_INTERNAL_LABEL(BUF,PREFIX,NUMBER) \ 96 sprintf ((BUF), "*%s%s%d", (TARGET_UNDERSCORES) ? "" : ".", \ 97 (PREFIX), (NUMBER)) 98 99/* This is how to output an internal numbered label where 100 PREFIX is the class of label and NUM is the number within the class. */ 101#undef ASM_OUTPUT_INTERNAL_LABEL 102#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ 103 fprintf ((FILE), "%s%s%d:\n", (TARGET_UNDERSCORES) ? "" : ".", \ 104 (PREFIX), (NUM)) 105 106/* This is how to hack on the symbol code of certain relcalcitrant 107 symbols to modify their output in output_pic_addr_const (). */ 108 109#undef ASM_HACK_SYMBOLREF_CODE 110#define ASM_HACK_SYMBOLREF_CODE(NAME, CODE) \ 111do { \ 112 /* Part of hack to avoid writing lots of rtl in \ 113 FUNCTION_PROFILER_EPILOGUE (). */ \ 114 char *_name = (NAME); \ 115 if (*_name == '.' && strcmp(_name + 1, "mexitcount") == 0) \ 116 (CODE) = 'X'; \ 117} while (0) 118 119/* This is how to output a reference to a user-level label named NAME. */ 120 121#undef ASM_OUTPUT_LABELREF 122#define ASM_OUTPUT_LABELREF(FILE, NAME) \ 123do { \ 124 char *_name = (NAME); \ 125 /* Hack to avoid writing lots of rtl in \ 126 FUNCTION_PROFILER_EPILOGUE (). */ \ 127 if (*_name == '.' && strcmp(_name + 1, "mexitcount") == 0) \ 128 { \ 129 if (TARGET_AOUT) \ 130 _name++; \ 131 if (flag_pic) \ 132 fprintf ((FILE), "*%s@GOT(%%ebx)", _name); \ 133 else \ 134 fprintf ((FILE), "%s", _name); \ 135 } \ 136 else \ 137 fprintf (FILE, "%s%s", TARGET_UNDERSCORES ? "_" : "", _name); \ 138} while (0) 139 140/* This is how to output an element of a case-vector that is relative. 141 This is only used for PIC code. See comments by the `casesi' insn in 142 i386.md for an explanation of the expression this outputs. */ 143#undef ASM_OUTPUT_ADDR_DIFF_ELT 144#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ 145 fprintf ((FILE), "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, (VALUE)) 146 147#undef ASM_OUTPUT_ALIGN 148#define ASM_OUTPUT_ALIGN(FILE, LOG) \ 149 if ((LOG)!=0) { \ 150 if (in_text_section()) \ 151 fprintf ((FILE), "\t.p2align %d,0x90\n", (LOG)); \ 152 else \ 153 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 154 } 155 156/* conditionalize the use of ".section rodata" on elf mode - otherwise .text */ 157#undef USE_CONST_SECTION 158#define USE_CONST_SECTION TARGET_ELF 159 160/* The a.out tools do not support "linkonce" sections. */ 161#undef SUPPORTS_ONE_ONLY 162#define SUPPORTS_ONE_ONLY TARGET_ELF 163 164/* The a.out tools do not support "Lscope" .stabs symbols. */ 165#undef NO_DBX_FUNCTION_END 166#define NO_DBX_FUNCTION_END TARGET_AOUT 167 168/* A C statement (sans semicolon) to output an element in the table of 169 global constructors. */ 170#undef ASM_OUTPUT_CONSTRUCTOR 171#define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) \ 172 do { \ 173 if (TARGET_ELF) { \ 174 ctors_section (); \ 175 fprintf ((FILE), "\t%s\t ", INT_ASM_OP); \ 176 assemble_name ((FILE), (NAME)); \ 177 fprintf ((FILE), "\n"); \ 178 } else { \ 179 fprintf (asm_out_file, "%s \"%s__CTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 180 (TARGET_UNDERSCORES) ? "_" : ""); \ 181 assemble_name (asm_out_file, name); \ 182 fputc ('\n', asm_out_file); \ 183 } \ 184 } while (0) 185 186/* A C statement (sans semicolon) to output an element in the table of 187 global destructors. */ 188#undef ASM_OUTPUT_DESTRUCTOR 189#define ASM_OUTPUT_DESTRUCTOR(FILE, NAME) \ 190 do { \ 191 if (TARGET_ELF) { \ 192 dtors_section (); \ 193 fprintf ((FILE), "\t%s\t ", INT_ASM_OP); \ 194 assemble_name ((FILE), (NAME)); \ 195 fprintf ((FILE), "\n"); \ 196 } else { \ 197 fprintf (asm_out_file, "%s \"%s__DTOR_LIST__\",22,0,0,", ASM_STABS_OP, \ 198 (TARGET_UNDERSCORES) ? "_" : ""); \ 199 assemble_name (asm_out_file, name); \ 200 fputc ('\n', asm_out_file); \ 201 } \ 202 } while (0) 203 204/* This says how to output assembler code to declare an 205 uninitialized internal linkage data object. Under SVR4, 206 the linker seems to want the alignment of data objects 207 to depend on their types. We do exactly that here. */ 208 209#undef ASM_OUTPUT_ALIGNED_LOCAL 210#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 211do { \ 212 if (TARGET_ELF) { \ 213 fprintf ((FILE), "\t%s\t", LOCAL_ASM_OP); \ 214 assemble_name ((FILE), (NAME)); \ 215 fprintf ((FILE), "\n"); \ 216 ASM_OUTPUT_ALIGNED_COMMON ((FILE), (NAME), (SIZE), (ALIGN)); \ 217 } else { \ 218 int rounded = (SIZE); \ 219 if (rounded == 0) rounded = 1; \ 220 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 221 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 222 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 223 fputs (".lcomm ", (FILE)); \ 224 assemble_name ((FILE), (NAME)); \ 225 fprintf ((FILE), ",%u\n", (rounded)); \ 226 } \ 227} while (0) 228 229#undef ASM_OUTPUT_ALIGNED_COMMON 230#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ 231do { \ 232 if (TARGET_ELF) { \ 233 fprintf ((FILE), "\t%s\t", COMMON_ASM_OP); \ 234 assemble_name ((FILE), (NAME)); \ 235 fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ 236 } else { \ 237 int rounded = (SIZE); \ 238 if (rounded == 0) rounded = 1; \ 239 rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 240 rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 241 * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 242 fputs (".comm ", (FILE)); \ 243 assemble_name ((FILE), (NAME)); \ 244 fprintf ((FILE), ",%u\n", (rounded)); \ 245 } \ 246} while (0) 247 248/* Turn off svr4.h version, it chokes the old gas. The old layout 249 works fine under new gas anyway. */ 250#undef ASM_OUTPUT_ASCII 251 252/* How to output some space */ 253#undef ASM_OUTPUT_SKIP 254#define ASM_OUTPUT_SKIP(FILE, SIZE) \ 255do { \ 256 if (TARGET_ELF) { \ 257 fprintf ((FILE), "\t%s\t%u\n", SKIP_ASM_OP, (SIZE)); \ 258 } else { \ 259 fprintf ((FILE), "\t.space %u\n", (SIZE)); \ 260 } \ 261} while (0) 262 263#undef ASM_OUTPUT_SOURCE_LINE 264#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ 265do { \ 266 static int sym_lineno = 1; \ 267 if (TARGET_ELF) { \ 268 fprintf ((FILE), ".stabn 68,0,%d,.LM%d-", (LINE), sym_lineno); \ 269 assemble_name ((FILE), XSTR (XEXP (DECL_RTL (current_function_decl),\ 270 0), 0)); \ 271 fprintf ((FILE), "\n.LM%d:\n", sym_lineno); \ 272 sym_lineno += 1; \ 273 } else { \ 274 fprintf ((FILE), "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, lineno); \ 275 } \ 276} while (0) 277 278/* in elf, the function stabs come first, before the relative offsets */ 279#undef DBX_FUNCTION_FIRST 280#define DBX_CHECK_FUNCTION_FIRST TARGET_ELF 281 282/* tag end of file in elf mode */ 283#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END 284#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ 285do { \ 286 if (TARGET_ELF) { \ 287 fprintf ((FILE), "\t.text\n\t.stabs \"\",%d,0,0,.Letext\n.Letext:\n", \ 288 N_SO); \ 289 } \ 290} while (0) 291 292/* stabs-in-elf has offsets relative to function beginning */ 293#undef DBX_OUTPUT_LBRAC 294#define DBX_OUTPUT_LBRAC(FILE, NAME) \ 295do { \ 296 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC); \ 297 assemble_name (asmfile, buf); \ 298 if (TARGET_ELF) { \ 299 fputc ('-', asmfile); \ 300 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl),\ 301 0), 0)); \ 302 } \ 303 fprintf (asmfile, "\n"); \ 304} while (0) 305 306#undef DBX_OUTPUT_RBRAC 307#define DBX_OUTPUT_RBRAC(FILE, NAME) \ 308do { \ 309 fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC); \ 310 assemble_name (asmfile, buf); \ 311 if (TARGET_ELF) { \ 312 fputc ('-', asmfile); \ 313 assemble_name (asmfile, XSTR (XEXP (DECL_RTL (current_function_decl),\ 314 0), 0)); \ 315 } \ 316 fprintf (asmfile, "\n"); \ 317} while (0) 318 319 320/* Define macro used to output shift-double opcodes when the shift 321 count is in %cl. Some assemblers require %cl as an argument; 322 some don't. 323 324 *OLD* GAS requires the %cl argument, so override i386/unix.h. */ 325 326#undef AS3_SHIFT_DOUBLE 327#define AS3_SHIFT_DOUBLE(a,b,c,d) AS3 (a,b,c,d) 328 329/* Indicate that jump tables go in the text section. This is 330 necessary when compiling PIC code. */ 331#undef JUMP_TABLES_IN_TEXT_SECTION 332#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) 333 334/* override the exception table positioning */ 335#undef EXCEPTION_SECTION 336#define EXCEPTION_SECTION() \ 337do { \ 338 if (TARGET_ELF) { \ 339 named_section (NULL_TREE, ".gcc_except_table", 0); \ 340 } else { \ 341 if (flag_pic) \ 342 data_section (); \ 343 else \ 344 readonly_data_section (); \ 345 } \ 346} while (0); 347 348/* supply our own hook for calling __main() from main() */ 349#undef INVOKE__main 350#define INVOKE__main 351#undef GEN_CALL__MAIN 352#define GEN_CALL__MAIN \ 353 do { \ 354 if (!(TARGET_ELF)) \ 355 emit_library_call (gen_rtx (SYMBOL_REF, Pmode, NAME__MAIN), 0, \ 356 VOIDmode, 0); \ 357 } while (0) 358 359/* Copy this from the svr4 specifications... */ 360/* Define the register numbers to be used in Dwarf debugging information. 361 The SVR4 reference port C compiler uses the following register numbers 362 in its Dwarf output code: 363 0 for %eax (gnu regno = 0) 364 1 for %ecx (gnu regno = 2) 365 2 for %edx (gnu regno = 1) 366 3 for %ebx (gnu regno = 3) 367 4 for %esp (gnu regno = 7) 368 5 for %ebp (gnu regno = 6) 369 6 for %esi (gnu regno = 4) 370 7 for %edi (gnu regno = 5) 371 The following three DWARF register numbers are never generated by 372 the SVR4 C compiler or by the GNU compilers, but SDB on x86/svr4 373 believes these numbers have these meanings. 374 8 for %eip (no gnu equivalent) 375 9 for %eflags (no gnu equivalent) 376 10 for %trapno (no gnu equivalent) 377 It is not at all clear how we should number the FP stack registers 378 for the x86 architecture. If the version of SDB on x86/svr4 were 379 a bit less brain dead with respect to floating-point then we would 380 have a precedent to follow with respect to DWARF register numbers 381 for x86 FP registers, but the SDB on x86/svr4 is so completely 382 broken with respect to FP registers that it is hardly worth thinking 383 of it as something to strive for compatibility with. 384 The version of x86/svr4 SDB I have at the moment does (partially) 385 seem to believe that DWARF register number 11 is associated with 386 the x86 register %st(0), but that's about all. Higher DWARF 387 register numbers don't seem to be associated with anything in 388 particular, and even for DWARF regno 11, SDB only seems to under- 389 stand that it should say that a variable lives in %st(0) (when 390 asked via an `=' command) if we said it was in DWARF regno 11, 391 but SDB still prints garbage when asked for the value of the 392 variable in question (via a `/' command). 393 (Also note that the labels SDB prints for various FP stack regs 394 when doing an `x' command are all wrong.) 395 Note that these problems generally don't affect the native SVR4 396 C compiler because it doesn't allow the use of -O with -g and 397 because when it is *not* optimizing, it allocates a memory 398 location for each floating-point variable, and the memory 399 location is what gets described in the DWARF AT_location 400 attribute for the variable in question. 401 Regardless of the severe mental illness of the x86/svr4 SDB, we 402 do something sensible here and we use the following DWARF 403 register numbers. Note that these are all stack-top-relative 404 numbers. 405 11 for %st(0) (gnu regno = 8) 406 12 for %st(1) (gnu regno = 9) 407 13 for %st(2) (gnu regno = 10) 408 14 for %st(3) (gnu regno = 11) 409 15 for %st(4) (gnu regno = 12) 410 16 for %st(5) (gnu regno = 13) 411 17 for %st(6) (gnu regno = 14) 412 18 for %st(7) (gnu regno = 15) 413*/ 414#undef DWARF_DBX_REGISTER_NUMBER 415#define DWARF_DBX_REGISTER_NUMBER(n) \ 416((n) == 0 ? 0 \ 417 : (n) == 1 ? 2 \ 418 : (n) == 2 ? 1 \ 419 : (n) == 3 ? 3 \ 420 : (n) == 4 ? 6 \ 421 : (n) == 5 ? 7 \ 422 : (n) == 6 ? 5 \ 423 : (n) == 7 ? 4 \ 424 : ((n) >= FIRST_STACK_REG && (n) <= LAST_STACK_REG) ? (n)+3 \ 425 : (-1)) 426 427/* Now what stabs expects in the register. */ 428#undef STABS_DBX_REGISTER_NUMBER 429#define STABS_DBX_REGISTER_NUMBER(n) \ 430((n) == 0 ? 0 : \ 431 (n) == 1 ? 2 : \ 432 (n) == 2 ? 1 : \ 433 (n) == 3 ? 3 : \ 434 (n) == 4 ? 6 : \ 435 (n) == 5 ? 7 : \ 436 (n) == 6 ? 4 : \ 437 (n) == 7 ? 5 : \ 438 (n) + 4) 439 440#undef DBX_REGISTER_NUMBER 441#define DBX_REGISTER_NUMBER(n) ((write_symbols == DWARF_DEBUG) \ 442 ? DWARF_DBX_REGISTER_NUMBER(n) \ 443 : STABS_DBX_REGISTER_NUMBER(n)) 444 445/* Tell final.c that we don't need a label passed to mcount. */ 446#define NO_PROFILE_DATA 447 448/* Output assembler code to FILE to begin profiling of the current function. 449 LABELNO is an optional label. */ 450 451#undef FUNCTION_PROFILER 452#define FUNCTION_PROFILER(FILE, LABELNO) \ 453do { \ 454 char *_name = TARGET_AOUT ? "mcount" : ".mcount"; \ 455 if (flag_pic) \ 456 fprintf ((FILE), "\tcall *%s@GOT(%%ebx)\n", _name); \ 457 else \ 458 fprintf ((FILE), "\tcall %s\n", _name); \ 459} while (0) 460 461/* Output assembler code to FILE to end profiling of the current function. */ 462 463#undef FUNCTION_PROFILER_EPILOGUE 464#define FUNCTION_PROFILER_EPILOGUE(FILE, DO_RTL) \ 465do { \ 466 if (TARGET_PROFILER_EPILOGUE) \ 467 { \ 468 if (DO_RTL) \ 469 { \ 470 /* ".mexitcount" is specially handled in \ 471 ASM_HACK_SYMBOLREF () so that we don't need to handle \ 472 flag_pic or TARGET_AOUT here. */ \ 473 rtx xop; \ 474 xop = gen_rtx_MEM (FUNCTION_MODE, \ 475 gen_rtx_SYMBOL_REF (Pmode, ".mexitcount")); \ 476 emit_call_insn (gen_rtx (CALL, VOIDmode, xop, const0_rtx)); \ 477 } \ 478 else \ 479 { \ 480 /* XXX this !DO_RTL case is broken but not actually used. */ \ 481 char *_name = TARGET_AOUT ? "mcount" : ".mcount"; \ 482 if (flag_pic) \ 483 fprintf (FILE, "\tcall *%s@GOT(%%ebx)\n", _name); \ 484 else \ 485 fprintf (FILE, "\tcall %s\n", _name); \ 486 } \ 487 } \ 488} while (0) 489 490#undef SIZE_TYPE 491#define SIZE_TYPE "unsigned int" 492 493#undef PTRDIFF_TYPE 494#define PTRDIFF_TYPE "int" 495 496#undef WCHAR_TYPE 497#define WCHAR_TYPE "int" 498 499#undef WCHAR_UNSIGNED 500#define WCHAR_UNSIGNED 0 501 502#undef WCHAR_TYPE_SIZE 503#define WCHAR_TYPE_SIZE BITS_PER_WORD 504 505#undef CPP_PREDEFINES 506#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386)" CPP_FBSD_PREDEFINES 507 508#undef CC1_SPEC 509#define CC1_SPEC "\ 510%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ 511%{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}" 512 513#undef ASM_SPEC 514#define ASM_SPEC "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}" 515 516/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support 517 for the special GCC options -static and -shared, which allow us to 518 link things in one of these three modes by applying the appropriate 519 combinations of options at link-time. We like to support here for 520 as many of the other GNU linker options as possible. But I don't 521 have the time to search for those flags. I am sure how to add 522 support for -soname shared_object_name. H.J. 523 524 I took out %{v:%{!V:-V}}. It is too much :-(. They can use 525 -Wl,-V. 526 527 When the -shared link option is used a final link is not being 528 done. */ 529 530#undef LINK_SPEC 531#define LINK_SPEC "\ 532 %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ 533 %{maout: %{shared:-Bshareable} \ 534 %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \ 535 %{pg:-Bstatic} %{Z}} \ 536 %{assert*} %{R*}} \ 537 %{!maout: \ 538 -m elf_i386 \ 539 %{Wl,*:%*} \ 540 %{assert*} %{R*} %{rpath*} %{defsym*} \ 541 %{shared:-Bshareable %{h*} %{soname*}} \ 542 %{symbolic:-Bsymbolic} \ 543 %{!shared: \ 544 %{!static: \ 545 %{rdynamic: -export-dynamic} \ 546 %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \ 547 %{static:-Bstatic}}}" 548 549/* A C statement to output to the stdio stream FILE an assembler 550 command to advance the location counter to a multiple of 1<<LOG 551 bytes if it is within MAX_SKIP bytes. 552 553 This is used to align code labels according to Intel recommendations. */ 554 555#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 556#error "we don't have this for the aout gas" 557#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \ 558 if ((LOG)!=0) \ 559 if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 560 else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)) 561#endif 562 563#undef STARTFILE_SPEC 564#define STARTFILE_SPEC "\ 565 %{maout: %{shared:c++rt0.o%s} \ 566 %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}} \ 567 %{!maout: %{!shared: \ 568 %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \ 569 crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" 570 571#undef ENDFILE_SPEC 572#define ENDFILE_SPEC \ 573 "%{!maout: %{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s}" 574 575/* This goes away when the math emulator is fixed. */ 576#undef TARGET_DEFAULT 577#define TARGET_DEFAULT \ 578 (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) 579 580/* FreeBSD ELF using our home-grown crtbegin.o/crtend.o does not support the 581 DWARF2 unwinding mechanisms. Once `make world' bootstraping problems with 582 the EGCS crtstuff.c is overcome, we will switch to the non-sjlj-exceptions 583 type exception machanism. */ 584#define DWARF2_UNWIND_INFO 0 585