freebsd.h revision 98597
134229Speter/* Definitions for Intel 386 running FreeBSD with either a.out or ELF format 295349Sobrien Copyright (C) 1996, 2000, 2002 Free Software Foundation, Inc. 334229Speter Contributed by Eric Youngdale. 434229Speter Modified for stabs-in-ELF by H.J. Lu. 551408Sobrien Adapted from GNU/Linux version by John Polstra. 634229Speter Added support for generating "old a.out gas" on the fly by Peter Wemm. 752112Sobrien Continued development by David O'Brien <obrien@freebsd.org> 818334Speter 918334SpeterThis file is part of GNU CC. 1018334Speter 1118334SpeterGNU CC is free software; you can redistribute it and/or modify 1218334Speterit under the terms of the GNU General Public License as published by 1318334Speterthe Free Software Foundation; either version 2, or (at your option) 1418334Speterany later version. 1518334Speter 1618334SpeterGNU CC is distributed in the hope that it will be useful, 1718334Speterbut WITHOUT ANY WARRANTY; without even the implied warranty of 1818334SpeterMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1918334SpeterGNU General Public License for more details. 2018334Speter 2118334SpeterYou should have received a copy of the GNU General Public License 2218334Speteralong with GNU CC; see the file COPYING. If not, write to 2318334Speterthe Free Software Foundation, 59 Temple Place - Suite 330, 2418334SpeterBoston, MA 02111-1307, USA. */ 2518334Speter 2651408Sobrien/* $FreeBSD: head/contrib/gcc/config/i386/freebsd.h 98597 2002-06-21 22:53:03Z obrien $ */ 2718334Speter 2858478Sobrien#undef CC1_SPEC 2995810Sobrien#define CC1_SPEC "%(cc1_cpu) %{profile:-p} \ 3058478Sobrien %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \ 3158478Sobrien %{maout: %{!mno-underscores: %{!munderscores: -munderscores }}}" 3251408Sobrien 3358478Sobrien#undef ASM_SPEC 3458478Sobrien#define ASM_SPEC "%{v*: -v} %{maout: %{fpic:-k} %{fPIC:-k}}" 3558478Sobrien 3695349Sobrien#undef ASM_FINAL_SPEC 3758478Sobrien#define ASM_FINAL_SPEC "%|" 3858478Sobrien 3958478Sobrien/* Provide a LINK_SPEC appropriate for FreeBSD. Here we provide support 4058478Sobrien for the special GCC options -static and -shared, which allow us to 4158478Sobrien link things in one of these three modes by applying the appropriate 4258478Sobrien combinations of options at link-time. We like to support here for 4358478Sobrien as many of the other GNU linker options as possible. But I don't 4458478Sobrien have the time to search for those flags. I am sure how to add 4558478Sobrien support for -soname shared_object_name. H.J. 4658478Sobrien 4758478Sobrien When the -shared link option is used a final link is not being 4858478Sobrien done. */ 4958478Sobrien 5058478Sobrien#undef LINK_SPEC 5158478Sobrien#define LINK_SPEC "\ 5258478Sobrien %{p:%e`-p' not supported; use `-pg' and gprof(1)} \ 5358478Sobrien %{maout: %{shared:-Bshareable} \ 5458478Sobrien %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \ 5558478Sobrien %{pg:-Bstatic} %{Z}} \ 5658478Sobrien %{assert*} %{R*}} \ 5758478Sobrien %{!maout: \ 5858478Sobrien %{Wl,*:%*} \ 5995349Sobrien %{v:-V} \ 6058478Sobrien %{assert*} %{R*} %{rpath*} %{defsym*} \ 6158478Sobrien %{shared:-Bshareable %{h*} %{soname*}} \ 6258478Sobrien %{!shared: \ 6358478Sobrien %{!static: \ 6458478Sobrien %{rdynamic: -export-dynamic} \ 6558478Sobrien %{!dynamic-linker: -dynamic-linker /usr/libexec/ld-elf.so.1}} \ 6695349Sobrien %{static:-Bstatic}} \ 6795349Sobrien %{symbolic:-Bsymbolic}}" 6858478Sobrien 6995349Sobrien/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add the magical 7095349Sobrien crtbegin.o file (see crtstuff.c) which provides part of the support for 7195349Sobrien getting C++ file-scope static object constructed before entering `main'. */ 7295349Sobrien 7358478Sobrien#undef STARTFILE_SPEC 7458478Sobrien#define STARTFILE_SPEC "\ 7558478Sobrien %{maout: %{shared:c++rt0.o%s} \ 7658478Sobrien %{!shared: \ 7758478Sobrien %{pg:gcrt0.o%s}%{!pg: \ 7858478Sobrien %{static:scrt0.o%s} \ 7958478Sobrien %{!static:crt0.o%s}}}} \ 8058478Sobrien %{!maout: \ 8158478Sobrien %{!shared: \ 8258478Sobrien %{pg:gcrt1.o%s} \ 8358478Sobrien %{!pg: \ 8458478Sobrien %{p:gcrt1.o%s} \ 8558478Sobrien %{!p:crt1.o%s}}} \ 8695349Sobrien crti.o%s \ 8795349Sobrien %{!shared:crtbegin.o%s} \ 8895349Sobrien %{shared:crtbeginS.o%s}}" 8958478Sobrien 9058478Sobrien/* Provide an ENDFILE_SPEC appropriate for FreeBSD/i386. Here we tack on our 9195349Sobrien own magical crtend.o file (see crtstuff.c) which provides part of the 9258478Sobrien support for getting C++ file-scope static object constructed before 9358478Sobrien entering `main', followed by the normal "finalizer" file, `crtn.o'. */ 9458478Sobrien 9558478Sobrien#undef ENDFILE_SPEC 9658478Sobrien#define ENDFILE_SPEC "\ 9758478Sobrien %{!maout: \ 9858478Sobrien %{!shared:crtend.o%s} \ 9958478Sobrien %{shared:crtendS.o%s} crtn.o%s}" 10058478Sobrien 10158478Sobrien 10258478Sobrien/************************[ Target stuff ]***********************************/ 10358478Sobrien 10495349Sobrien/* Define the actual types of some ANSI-mandated types. 10558478Sobrien Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.c, 10658478Sobrien c-common.c, and config/<arch>/<arch>.h. */ 10758478Sobrien 10895349Sobrien#undef SIZE_TYPE 10998597Sobrien#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") 11095349Sobrien 11195349Sobrien#undef PTRDIFF_TYPE 11298597Sobrien#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") 11358478Sobrien 11495349Sobrien#undef WCHAR_TYPE_SIZE 11598597Sobrien#define WCHAR_TYPE_SIZE (TARGET_64BIT ? 32 : BITS_PER_WORD) 11695349Sobrien 11758478Sobrien#undef TARGET_VERSION 11858478Sobrien#define TARGET_VERSION fprintf (stderr, " (i386 FreeBSD/ELF)"); 11958478Sobrien 12034229Speter#define MASK_PROFILER_EPILOGUE 010000000000 12134229Speter#define MASK_AOUT 004000000000 /* a.out not elf */ 12234229Speter#define MASK_UNDERSCORES 002000000000 /* use leading _ */ 12318349Speter 12434229Speter#define TARGET_PROFILER_EPILOGUE (target_flags & MASK_PROFILER_EPILOGUE) 12534229Speter#define TARGET_AOUT (target_flags & MASK_AOUT) 12634229Speter#define TARGET_ELF ((target_flags & MASK_AOUT) == 0) 12734229Speter#define TARGET_UNDERSCORES ((target_flags & MASK_UNDERSCORES) != 0) 12818349Speter 12934229Speter#undef SUBTARGET_SWITCHES 13052112Sobrien#define SUBTARGET_SWITCHES \ 13168601Sobrien { "profiler-epilogue", MASK_PROFILER_EPILOGUE, "Function profiler epilogue"}, \ 13268601Sobrien { "no-profiler-epilogue", -MASK_PROFILER_EPILOGUE, "No function profiler epilogue"}, \ 13368601Sobrien { "aout", MASK_AOUT, "Generate an a.out (vs. ELF) binary"}, \ 13468601Sobrien { "no-aout", -MASK_AOUT, "Do not generate an a.out binary"}, \ 13568601Sobrien { "underscores", MASK_UNDERSCORES, "Add leading underscores to symbols"}, \ 13668601Sobrien { "no-underscores", -MASK_UNDERSCORES, "Do not add leading underscores to symbols"}, 13718349Speter 13858478Sobrien/* This goes away when the math emulator is fixed. */ 13995810Sobrien#undef TARGET_SUBTARGET_DEFAULT 14095810Sobrien#define TARGET_SUBTARGET_DEFAULT \ 14158478Sobrien (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_NO_FANCY_MATH_387) 14258478Sobrien 14395349Sobrien/* Don't default to pcc-struct-return, we want to retain compatibility with 14495349Sobrien older gcc versions AND pcc-struct-return is nonreentrant. 14595349Sobrien (even though the SVR4 ABI for the i386 says that records and unions are 14695349Sobrien returned in memory). */ 14718349Speter 14895349Sobrien#undef DEFAULT_PCC_STRUCT_RETURN 14995349Sobrien#define DEFAULT_PCC_STRUCT_RETURN 0 15095349Sobrien 15158478Sobrien/* The a.out tools do not support "linkonce" sections. */ 15258478Sobrien#undef SUPPORTS_ONE_ONLY 15358478Sobrien#define SUPPORTS_ONE_ONLY TARGET_ELF 15418349Speter 15595349Sobrien/* Prefix for internally generated assembler labels. If we aren't using 15695349Sobrien underscores, we are using prefix `.'s to identify labels that should 15795349Sobrien be ignored, as in `i386/gas.h' --karl@cs.umb.edu */ 15895349Sobrien#undef LPREFIX 15995349Sobrien#define LPREFIX ((TARGET_UNDERSCORES) ? "L" : ".L") 16018349Speter 16158478Sobrien/* supply our own hook for calling __main() from main() */ 16258478Sobrien#undef INVOKE__main 16358478Sobrien#define INVOKE__main 16458478Sobrien#undef GEN_CALL__MAIN 16558478Sobrien#define GEN_CALL__MAIN \ 16658478Sobrien do { \ 16758478Sobrien if (!(TARGET_ELF)) \ 16858478Sobrien emit_library_call (gen_rtx (SYMBOL_REF, Pmode, NAME__MAIN), 0, \ 16958478Sobrien VOIDmode, 0); \ 17058478Sobrien } while (0) 17158478Sobrien 17258478Sobrien/* Tell final.c that we don't need a label passed to mcount. */ 17395810Sobrien#define NO_PROFILE_COUNTERS 1 17458478Sobrien 17558478Sobrien/* Output assembler code to FILE to begin profiling of the current function. 17658478Sobrien LABELNO is an optional label. */ 17758478Sobrien 17858478Sobrien#undef FUNCTION_PROFILER 17958478Sobrien#define FUNCTION_PROFILER(FILE, LABELNO) \ 18058478Sobrien do { \ 18158478Sobrien char *_name = TARGET_AOUT ? "mcount" : ".mcount"; \ 18258478Sobrien if (flag_pic) \ 18358478Sobrien fprintf ((FILE), "\tcall *%s@GOT(%%ebx)\n", _name); \ 18458478Sobrien else \ 18558478Sobrien fprintf ((FILE), "\tcall %s\n", _name); \ 18658478Sobrien } while (0) 18758478Sobrien 18858478Sobrien/* Output assembler code to FILE to end profiling of the current function. */ 18958478Sobrien 19095810Sobrien#undef FUNCTION_PROFILER_EPILOGUE /* BDE will need to fix this. */ 19158478Sobrien 19258478Sobrien 19358478Sobrien/************************[ Assembler stuff ]********************************/ 19458478Sobrien 19595348Sobrien/* Override the default comment-starter of "/" from unix.h. */ 19695348Sobrien#undef ASM_COMMENT_START 19795348Sobrien#define ASM_COMMENT_START "#" 19895348Sobrien 19996144Sobrien/* Override the default comment-starter of "/APP" from unix.h. */ 20058478Sobrien#undef ASM_APP_ON 20158478Sobrien#define ASM_APP_ON "#APP\n" 20258478Sobrien#undef ASM_APP_OFF 20395349Sobrien#define ASM_APP_OFF "#NO_APP\n" 20458478Sobrien 20598572Sobrien/* Override the default string pseudo-op of "\t.string\t" from ../elfos.h. 20698572Sobrien ".string" doesn't work for the aout case. */ 20798572Sobrien#undef STRING_ASM_OP 20898572Sobrien#define STRING_ASM_OP (TARGET_AOUT ? "\t.asciz\t" : "\t.string\t") 20998572Sobrien 21098572Sobrien/* Override the use of "\t.section\t.rodata" from ../elfos.h. Neither 21198572Sobrien ".section" nor "rodata" works for the aout case. This forces a fallback 21298572Sobrien to ".text". */ 21398572Sobrien#undef USE_CONST_SECTION 21498572Sobrien#define USE_CONST_SECTION TARGET_ELF 21598572Sobrien 21634229Speter/* This is how to store into the string BUF 21795349Sobrien the symbol_ref name of an internal numbered label where 21895349Sobrien PREFIX is the class of label and NUM is the number within the class. 21934229Speter This is suitable for output with `assemble_name'. */ 22034229Speter#undef ASM_GENERATE_INTERNAL_LABEL 22195810Sobrien#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ 22295810Sobrien sprintf ((LABEL), "*%s%s%u", (TARGET_UNDERSCORES) ? "" : ".", \ 22395810Sobrien (PREFIX), (unsigned) (NUM)) 22418349Speter 22534229Speter/* This is how to output an internal numbered label where 22658478Sobrien PREFIX is the class of label and NUM is the number within the class. 22758478Sobrien For most svr4/ELF systems, the convention is that any symbol which begins 22858478Sobrien with a period is not put into the linker symbol table by the assembler. */ 22934229Speter#undef ASM_OUTPUT_INTERNAL_LABEL 23095810Sobrien#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \ 23195810Sobrien fprintf ((FILE), "%s%s%u:\n", (TARGET_UNDERSCORES) ? "" : ".", \ 23295810Sobrien (PREFIX), (unsigned) (NUM)) 23318334Speter 23458478Sobrien/* This is how to output a reference to a user-level label named NAME. */ 23558478Sobrien#undef ASM_OUTPUT_LABELREF 23658478Sobrien#define ASM_OUTPUT_LABELREF(FILE, NAME) \ 23758478Sobrien do { \ 23858478Sobrien char *_name = (NAME); \ 23958478Sobrien /* Hack to avoid writing lots of rtl in \ 24058478Sobrien FUNCTION_PROFILER_EPILOGUE (). */ \ 24158478Sobrien if (*_name == '.' && strcmp(_name + 1, "mexitcount") == 0) \ 24258478Sobrien { \ 24358478Sobrien if (TARGET_AOUT) \ 24458478Sobrien _name++; \ 24558478Sobrien if (flag_pic) \ 24658478Sobrien fprintf ((FILE), "*%s@GOT(%%ebx)", _name); \ 24758478Sobrien else \ 24858478Sobrien fprintf ((FILE), "%s", _name); \ 24958478Sobrien } \ 25058478Sobrien else \ 25158478Sobrien fprintf (FILE, "%s%s", TARGET_UNDERSCORES ? "_" : "", _name); \ 25258478Sobrien} while (0) 25358478Sobrien 25456810Sobrien/* This is how to hack on the symbol code of certain relcalcitrant 25556810Sobrien symbols to modify their output in output_pic_addr_const (). */ 25656810Sobrien 25795810Sobrien#undef ASM_HACK_SYMBOLREF_CODE /* BDE will need to fix this. */ 25856810Sobrien 25958478Sobrien#undef ASM_OUTPUT_ALIGN 26052112Sobrien#define ASM_OUTPUT_ALIGN(FILE, LOG) \ 26197907Sobrien do { \ 26297907Sobrien if ((LOG)!=0) { \ 26397907Sobrien if (in_text_section()) \ 26497907Sobrien fprintf ((FILE), "\t.p2align %d,0x90\n", (LOG)); \ 26597907Sobrien else \ 26697907Sobrien fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 26797907Sobrien } \ 26896466Sobrien } while (0) 26918349Speter 27073305Sobrien#undef ASM_OUTPUT_ALIGNED_COMMON 27173305Sobrien#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ 27273305Sobrien do { \ 27373305Sobrien if (TARGET_ELF) \ 27473305Sobrien { \ 27573305Sobrien fprintf ((FILE), "%s", COMMON_ASM_OP); \ 27673305Sobrien assemble_name ((FILE), (NAME)); \ 27773305Sobrien fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT); \ 27873305Sobrien } \ 27973305Sobrien else \ 28073305Sobrien { \ 28197908Sobrien int alignbytes = ((ALIGN) + BITS_PER_UNIT - 1) / BITS_PER_UNIT; \ 28273305Sobrien int rounded = (SIZE); \ 28397908Sobrien rounded += alignbytes - 1; \ 28497908Sobrien rounded = (rounded / alignbytes) * alignbytes; \ 28573305Sobrien fprintf ((FILE), "%s ", COMMON_ASM_OP); \ 28673305Sobrien assemble_name ((FILE), (NAME)); \ 28773305Sobrien fprintf ((FILE), ",%u\n", (rounded)); \ 28873305Sobrien } \ 28973305Sobrien } while (0) 29073305Sobrien 29173305Sobrien/* This says how to output assembler code to declare an 29273305Sobrien uninitialized internal linkage data object. Under SVR4, 29373305Sobrien the linker seems to want the alignment of data objects 29473305Sobrien to depend on their types. We do exactly that here. */ 29573305Sobrien 29673305Sobrien#undef ASM_OUTPUT_ALIGNED_LOCAL 29773305Sobrien#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ 29873305Sobrien do { \ 29973305Sobrien if (TARGET_ELF) \ 30073305Sobrien { \ 30173305Sobrien fprintf ((FILE), "%s", LOCAL_ASM_OP); \ 30273305Sobrien assemble_name ((FILE), (NAME)); \ 30373305Sobrien fprintf ((FILE), "\n"); \ 30473305Sobrien ASM_OUTPUT_ALIGNED_COMMON ((FILE), (NAME), (SIZE), (ALIGN)); \ 30573305Sobrien } \ 30673305Sobrien else \ 30773305Sobrien { \ 30873305Sobrien int rounded = (SIZE); \ 30973305Sobrien if (rounded == 0) rounded = 1; \ 31073305Sobrien rounded += (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1; \ 31173305Sobrien rounded = (rounded / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) \ 31273305Sobrien * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); \ 31373305Sobrien fputs ("\t.lcomm\t", (FILE)); \ 31473305Sobrien assemble_name ((FILE), (NAME)); \ 31573305Sobrien fprintf ((FILE), ",%u\n", (rounded)); \ 31673305Sobrien } \ 31773305Sobrien } while (0) 31873305Sobrien 31973305Sobrien/* How to output some space. The rules are different depending on the 32073305Sobrien object format. */ 32173305Sobrien#undef ASM_OUTPUT_SKIP 32273305Sobrien#define ASM_OUTPUT_SKIP(FILE, SIZE) \ 32373305Sobrien do { \ 32473305Sobrien if (TARGET_ELF) \ 32573305Sobrien { \ 32673305Sobrien fprintf ((FILE), "%s%u\n", SKIP_ASM_OP, (SIZE)); \ 32773305Sobrien } \ 32873305Sobrien else \ 32973305Sobrien { \ 33073305Sobrien fprintf ((FILE), "\t.space\t%u\n", (SIZE)); \ 33173305Sobrien } \ 33273305Sobrien } while (0) 33373305Sobrien 33458478Sobrien#undef ASM_OUTPUT_SOURCE_LINE 33558478Sobrien#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ 33658478Sobrien do { \ 33758478Sobrien static int sym_lineno = 1; \ 33858478Sobrien if (TARGET_ELF) \ 33958478Sobrien { \ 34058478Sobrien fprintf ((FILE), ".stabn 68,0,%d,.LM%d-", (LINE), sym_lineno); \ 34158478Sobrien assemble_name ((FILE), \ 34258478Sobrien XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \ 34358478Sobrien fprintf ((FILE), "\n.LM%d:\n", sym_lineno); \ 34458478Sobrien sym_lineno += 1; \ 34558478Sobrien } \ 34658478Sobrien else \ 34758478Sobrien { \ 34858478Sobrien fprintf ((FILE), "\t%s %d,0,%d\n", ASM_STABD_OP, N_SLINE, \ 34958478Sobrien lineno); \ 35058478Sobrien } \ 35158478Sobrien } while (0) 35218334Speter 35395810Sobrien/* A C statement to output to the stdio stream FILE an assembler 35495810Sobrien command to advance the location counter to a multiple of 1<<LOG 35595810Sobrien bytes if it is within MAX_SKIP bytes. 35651408Sobrien 35795810Sobrien This is used to align code labels according to Intel recommendations. */ 35851408Sobrien 35996447Sobrien/* XXX configuration of this is broken in the same way as HAVE_GAS_SHF_MERGE, 36096447Sobrien but it is easier to fix in an MD way. */ 36196447Sobrien 36295810Sobrien#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN 36396447Sobrien#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE, LOG, MAX_SKIP) \ 36496466Sobrien do { \ 36597910Sobrien if ((LOG) != 0) { \ 36697910Sobrien if (TARGET_AOUT) \ 36797910Sobrien ASM_OUTPUT_ALIGN ((FILE), (LOG)); \ 36897910Sobrien else if ((MAX_SKIP) == 0) \ 36997910Sobrien fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ 37097910Sobrien else \ 37197910Sobrien fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ 37297910Sobrien } \ 37396466Sobrien } while (0) 37495810Sobrien#endif 37558478Sobrien 37673305Sobrien 37758478Sobrien/************************[ Debugger stuff ]*********************************/ 37818334Speter 37995349Sobrien/* The a.out tools do not support "Lscope" .stabs symbols. */ 38095349Sobrien#undef NO_DBX_FUNCTION_END 38195349Sobrien#define NO_DBX_FUNCTION_END TARGET_AOUT 38295349Sobrien 38395349Sobrien/* In ELF, the function stabs come first, before the relative offsets. */ 38495349Sobrien#undef DBX_FUNCTION_FIRST 38595349Sobrien#define DBX_CHECK_FUNCTION_FIRST TARGET_ELF 38695349Sobrien 38734229Speter#undef DBX_REGISTER_NUMBER 38895810Sobrien#define DBX_REGISTER_NUMBER(n) (TARGET_64BIT ? dbx64_register_map[n] \ 38995810Sobrien : (write_symbols == DWARF2_DEBUG \ 39093263Sobrien || write_symbols == DWARF_DEBUG) \ 39195810Sobrien ? svr4_dbx_register_map[(n)] \ 39295810Sobrien : dbx_register_map[(n)]) 39334229Speter 39458478Sobrien/* tag end of file in elf mode */ 39558478Sobrien#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END 39658478Sobrien#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \ 39758478Sobrien do { \ 39858478Sobrien if (TARGET_ELF) { \ 39997943Sobrien asm_fprintf ((FILE), \ 40097943Sobrien "\t.text\n\t.stabs \"\",%d,0,0,%LLetext\n%LLetext:\n",\ 40197943Sobrien N_SO); \ 40218334Speter } \ 40358478Sobrien } while (0) 40418334Speter 40558478Sobrien/* stabs-in-elf has offsets relative to function beginning */ 40658478Sobrien#undef DBX_OUTPUT_LBRAC 40758478Sobrien#define DBX_OUTPUT_LBRAC(FILE, NAME) \ 40858478Sobrien do { \ 40958478Sobrien fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_LBRAC); \ 41058478Sobrien assemble_name (asmfile, buf); \ 41158478Sobrien if (TARGET_ELF) \ 41258478Sobrien { \ 41358478Sobrien fputc ('-', asmfile); \ 41458478Sobrien assemble_name (asmfile, \ 41558478Sobrien XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \ 41658478Sobrien } \ 41758478Sobrien fprintf (asmfile, "\n"); \ 41858478Sobrien } while (0) 41952112Sobrien 42058478Sobrien#undef DBX_OUTPUT_RBRAC 42158478Sobrien#define DBX_OUTPUT_RBRAC(FILE, NAME) \ 42258478Sobrien do { \ 42358478Sobrien fprintf (asmfile, "%s %d,0,0,", ASM_STABN_OP, N_RBRAC); \ 42458478Sobrien assemble_name (asmfile, buf); \ 42558478Sobrien if (TARGET_ELF) \ 42658478Sobrien { \ 42758478Sobrien fputc ('-', asmfile); \ 42858478Sobrien assemble_name (asmfile, \ 42958478Sobrien XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \ 43058478Sobrien } \ 43158478Sobrien fprintf (asmfile, "\n"); \ 43258478Sobrien } while (0) 433