diff options
65 files changed, 112 insertions, 731 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73e07b5..628f528 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,65 @@ +2001-04-16 Zack Weinberg <zackw@stanford.edu> + + * toplev.c (output_lang_identify): Delete. + (compile_file): Don't call ASM_IDENTIFY_GCC or ASM_IDENTIFY_LANGUAGE. + Don't generate gcc2_compiled. label. Don't emit a nop if profiling. + If IDENT_ASM_OP is defined, emit an .ident "GCC (GNU) <version>" + after calling ASM_FILE_END. + + * dbxout.c (dbxout_init): Don't call ASM_IDENTIFY_GCC_AFTER_SOURCE. + Instead, unconditionally emit an N_OPT stab with string equal + to STABS_GCC_MARKER, which defaults to "gcc2_compiled." + + * defaults.h: Don't provide default for ASM_IDENTIFY_LANGUAGE. + + * config/dbxelf.h, config/freebsd.h, config/nextstep.h, + config/psos.h, config/ptx4.h, config/1750a/1750a.h, + config/alpha/alpha.h, config/alpha/elf.h, config/arc/arc.h, + config/arm/aof.h, config/arm/coff.h, config/arm/elf.h, + config/arm/linux-elf.h, config/avr/avr.h, config/d30v/d30v.h, + config/dsp16xx/dsp16xx.h, config/h8300/h8300.h, + config/i370/i370.h, config/i386/beos-elf.h, + config/i386/osf1elf.h, config/i386/osfrose.h, + config/ia64/sysv4.h, config/m68k/3b1.h, config/m68k/auxgas.h, + config/m68k/crds.h, config/m68k/hp320.h, config/m68k/m68kv4.h, + config/m68k/mot3300.h, config/m68k/news.h, config/m68k/sgs.h, + config/m68k/tower-as.h, config/mcore/mcore-elf.h, + config/mips/iris6.h, config/mips/osfrose.h, + config/mips/sni-svr4.h, config/pa/som.h, config/pdp11/pdp11.h, + config/sparc/sp64-elf.h: + Delete definitions of any or all of: ASM_IDENTIFY_GCC, + ASM_IDENTIFY_GCC_AFTER_SOURCE, and ASM_IDENTIFY_LANGUAGE. + + * config/elfos.h, config/freebsd.h, config/linux.h, + config/alpha/elf.h, config/arm/linux-elf.h, config/i386/i386elf.h, + config/i386/ptx4-i.h, config/mips/gnu.h, config/mips/linux.h, + config/sparc/linux.h, config/sparc/linux64.h: Delete definitions + of ASM_FILE_START which merely emit a .version directive. Delete + definitions of ASM_FILE_END which merely emit an .ident directive. + + * config/avr/avr.h, config/vax/vax.h: Delete definition of + ASM_IDENTIFY_GCC and move part of its logic into + ASM_FILE_START. + + * config/i386/att.h, config/i386/gas.h, config/i386/linux.h, + config/sparc/linux-aout.h: Don't emit .version directive in + ASM_FILE_START. + + * config/i386/dgux.c, config/m88k/m88k.c, config/sh/sh.c + (output_file_start): Correct comment. + + * config/i386/osfrose.h: Don't emit trailing .ident directive. + * config/m68k/mot3300.h: Override STABS_GCC_MARKER to "gcc2_compiled%" + to match gdb. + * config/pa/lib2funcs.asm: Delete gcc_compiled. label. + * config/rs6000/aix.h: Correct comment. + + * config/i386/i386afe.h: Delete. + * config.gcc: Remove references to i386afe.h. + + * tm.texi: Delete documentation of ASM_IDENTIFY_GCC. The + other macros deleted by this patch were undocumented. + Mon Apr 16 08:03:48 2001 Jeffrey A Law (law@cygnus.com) * pa.md (reload_outdi): Operand 0 must be a non hard register. diff --git a/gcc/config.gcc b/gcc/config.gcc index 21ac388..ed888a9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -900,7 +900,7 @@ i370-*-linux*) ;; i[34567]86-*-chorusos*) xm_defines='USG POSIX' - tm_file="i386/i386.h i386/att.h elfos.h i386/i386afe.h i386/i386elf.h i386/chorus.h" + tm_file="i386/i386.h i386/att.h elfos.h i386/i386elf.h i386/chorus.h" tmake_file=i386/t-i386elf xmake_file=x-svr4 case x${enable_threads} in @@ -911,7 +911,7 @@ i[34567]86-*-chorusos*) ;; i[34567]86-*-elf*) xm_defines='USG POSIX' - tm_file="i386/i386.h i386/att.h elfos.h i386/i386afe.h i386/i386elf.h" + tm_file="i386/i386.h i386/att.h elfos.h i386/i386elf.h" tmake_file=i386/t-i386elf xmake_file=x-svr4 ;; @@ -1023,7 +1023,7 @@ i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aou tmake_file=t-freebsd ;; i[34567]86-*-freebsd*) - tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/i386afe.h i386/freebsd.h i386/perform.h" + tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd.h i386/perform.h" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" tmake_file=t-freebsd gas=yes @@ -1083,7 +1083,7 @@ i[34567]86-*-linux*libc1) # Intel 80386's running GNU/Linux # with ELF format using the # GNU/Linux C library 5 xmake_file=x-linux - tm_file="i386/i386.h i386/att.h linux.h i386/i386afe.h i386/linux.h" + tm_file="i386/i386.h i386/att.h linux.h i386/linux.h" tmake_file="t-linux t-linux-gnulibc1 i386/t-crtstuff" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes @@ -1096,7 +1096,7 @@ i[34567]86-*-linux*) # Intel 80386's running GNU/Linux # with ELF format using glibc 2 # aka GNU/Linux C library 6 xmake_file=x-linux - tm_file="i386/i386.h i386/att.h linux.h i386/i386afe.h i386/linux.h" + tm_file="i386/i386.h i386/att.h linux.h i386/linux.h" tmake_file="t-linux i386/t-crtstuff" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes @@ -1127,7 +1127,7 @@ i[34567]86-pc-msdosdjgpp*) esac ;; i[34567]86-moss-msdos* | i[34567]86-*-moss*) - tm_file="i386/i386.h i386/att.h linux.h i386/i386afe.h i386/linux.h i386/moss.h" + tm_file="i386/i386.h i386/att.h linux.h i386/linux.h i386/moss.h" tmake_file=t-libc-ok gnu_ld=yes gas=yes diff --git a/gcc/config/1750a/1750a.h b/gcc/config/1750a/1750a.h index 94f4262..ea2e8bb 100644 --- a/gcc/config/1750a/1750a.h +++ b/gcc/config/1750a/1750a.h @@ -1048,8 +1048,6 @@ enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA /****************** Assembler output formatting **********************/ -#define ASM_IDENTIFY_GCC(FILE) fputs ("; gcc2_compiled:\n", FILE) - #define ASM_COMMENT_START ";" #define ASM_OUTPUT_FUNNAM(FILE,NAME) \ diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 7d4c194..3e44953 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1930,15 +1930,6 @@ do { \ /* Control the assembler format that we output. */ -/* We don't emit these labels, so as to avoid getting linker errors about - missing exception handling info. If we emit a gcc_compiled. label into - text, and the file has no code, then the DEC assembler gives us a zero - sized text section with no associated exception handling info. The - DEC linker sees this text section, and gives a warning saying that - the exception handling info is missing. */ -#define ASM_IDENTIFY_GCC(x) -#define ASM_IDENTIFY_LANGUAGE(x) - /* Output to assembler file text saying following lines may contain character constants, extra white space, comments, etc. */ diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h index 9224a39..700f2c5 100644 --- a/gcc/config/alpha/elf.h +++ b/gcc/config/alpha/elf.h @@ -66,31 +66,9 @@ do { \ } \ } while (0) -/* Attach a special .ident directive to the end of the file to identify - the version of GCC which compiled this code. The format of the - .ident string is patterned after the ones produced by native svr4 - C compilers. */ - #undef IDENT_ASM_OP #define IDENT_ASM_OP "\t.ident\t" -#ifdef IDENTIFY_WITH_IDENT -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) /* nothing */ -#undef ASM_IDENTIFY_LANGUAGE -#define ASM_IDENTIFY_LANGUAGE(FILE) \ - fprintf(FILE, "%s\"GCC (%s) %s\"\n", IDENT_ASM_OP, \ - lang_identify(), version_string) -#else -#undef ASM_FILE_END -#define ASM_FILE_END(FILE) \ -do { \ - if (!flag_no_ident) \ - fprintf ((FILE), "%s\"GCC: (GNU) %s\"\n", \ - IDENT_ASM_OP, version_string); \ - } while (0) -#endif - /* Allow #sccs in preprocessor. */ #define SCCS_DIRECTIVE diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 520266b..04121fd 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -1260,15 +1260,6 @@ do { \ #undef ASM_FILE_START #define ASM_FILE_START(FILE) arc_asm_file_start (FILE) -/* A C statement to output assembler commands which will identify the - object file as having been compiled with GNU CC (or another GNU - compiler). */ -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) /* nothing */ - -/* Needed because we define ASM_IDENTIFY_GCC. */ -#define ASM_IDENTIFY_LANGUAGE(FILE) output_lang_identify (FILE) - /* A C string constant describing how to begin a comment in the target assembler language. The compiler assumes that the comment will end at the end of the line. */ diff --git a/gcc/config/arm/aof.h b/gcc/config/arm/aof.h index 60d736a..f10b7c4 100644 --- a/gcc/config/arm/aof.h +++ b/gcc/config/arm/aof.h @@ -220,8 +220,6 @@ do \ fputs ("\tEND\n", (STREAM)); \ } while (0); -#define ASM_IDENTIFY_GCC(STREAM) fputs ("|gcc2_compiled.|\n", (STREAM)) - #define ASM_COMMENT_START ";" #define ASM_APP_ON "" diff --git a/gcc/config/arm/coff.h b/gcc/config/arm/coff.h index 94999d4..6265691 100644 --- a/gcc/config/arm/coff.h +++ b/gcc/config/arm/coff.h @@ -57,13 +57,6 @@ Boston, MA 02111-1307, USA. */ /* A C statement to output assembler commands which will identify the object file as having been compiled with GNU CC (or another GNU compiler). */ -/* Define this to NULL so we don't get anything. - We have ASM_IDENTIFY_LANGUAGE. - Also, when using stabs, gcc2_compiled must be a stabs entry, not an - ordinary symbol, or gdb won't see it. The stabs entry must be - before the N_SO in order for gdb to find it. */ -#define ASM_IDENTIFY_GCC(STREAM) \ - fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX ) /* This outputs a lot of .req's to define alias for various registers. Let's try to avoid this. */ diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h index 3277044..bb7be33 100644 --- a/gcc/config/arm/elf.h +++ b/gcc/config/arm/elf.h @@ -198,19 +198,6 @@ Boston, MA 02111-1307, USA. */ arm_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS) -/* A C statement to output assembler commands which will identify the - object file as having been compiled with GNU CC (or another GNU - compiler). */ -/* Define this to NULL so we don't get anything. - We have ASM_IDENTIFY_LANGUAGE. - Also, when using stabs, gcc2_compiled must be a stabs entry, not an - ordinary symbol, or gdb won't see it. The stabs entry must be - before the N_SO in order for gdb to find it. */ -#ifndef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(STREAM) \ - fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX ) -#endif - /* This outputs a lot of .req's to define alias for various registers. Let's try to avoid this. */ #ifndef ASM_FILE_START diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index 09e4e15..acaa71d 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -92,27 +92,11 @@ Boston, MA 02111-1307, USA. */ #define USER_LABEL_PREFIX "" /* For ELF the default is no underscores */ #define LOCAL_LABEL_PREFIX "." -/* Attach a special .ident directive to the end of the file to identify - the version of GCC which compiled this code. */ #define IDENT_ASM_OP "\t.ident\t" /* Output #ident as a .ident. */ #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME); - -#ifdef IDENTIFY_WITH_IDENT -#define ASM_IDENTIFY_GCC(FILE) /* nothing */ -#define ASM_IDENTIFY_LANGUAGE(FILE) \ - fprintf (FILE, "%s\"GCC (%s) %s\"\n", IDENT_ASM_OP, \ - lang_identify (), version_string) -#else -#define ASM_FILE_END(FILE) \ -do { \ - if (!flag_no_ident) \ - fprintf ((FILE), "%s\"GCC: (GNU) %s\"\n", \ - IDENT_ASM_OP, version_string); \ - } while (0) -#endif /* Support const sections and the ctors and dtors sections for g++. Note that there appears to be two different ways to support const diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index 34566b6..96f2872 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -3256,12 +3256,3 @@ extern struct rtx_def *ldi_reg_rtx; /* Get the standard ELF stabs definitions. */ #include "dbxelf.h" - -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) \ -do \ - { \ - if (write_symbols != DBX_DEBUG) \ - fputs ("gcc2_compiled.:\n", FILE); \ - } \ -while (0) diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h index 3f351e3..9a19f85 100644 --- a/gcc/config/c4x/c4x.h +++ b/gcc/config/c4x/c4x.h @@ -2167,6 +2167,10 @@ dtors_section () \ /* Overall Framework of an Assembler File. */ +/* We need to have a data section we can identify so that we can set + the DP register back to a data pointer in the small memory model. + This is only required for ISRs if we are paranoid that someone + may have quietly changed this register on the sly. */ #define ASM_FILE_START(FILE) \ { \ @@ -2189,18 +2193,9 @@ dtors_section () \ } \ else \ output_quoted_string (FILE, main_input_filename); \ - fprintf (FILE, "\n"); \ + fputs ("\n\t.data\ndata_sec:\n", FILE); \ } -/* We need to have a data section we can identify so that we can set - the DP register back to a data pointer in the small memory model. - This is only required for ISRs if we are paranoid that someone - may have quietly changed this register on the sly. */ - -#define ASM_IDENTIFY_GCC(FILE) \ - if (! TARGET_TI) fputs ("gcc2_compiled.:\n", FILE); \ - fputs ("\t.data\ndata_sec:\n", FILE); - #define ASM_COMMENT_START ";" #define ASM_APP_ON "" diff --git a/gcc/config/d30v/d30v.h b/gcc/config/d30v/d30v.h index 1d150cf..4015227 100644 --- a/gcc/config/d30v/d30v.h +++ b/gcc/config/d30v/d30v.h @@ -4071,28 +4071,6 @@ extern const char *d30v_branch_cost_string; Defined in svr4.h. */ /* #define ASM_FILE_END(STREAM) */ -/* A C statement to output assembler commands which will identify the object - file as having been compiled with GNU CC (or another GNU compiler). - - If you don't define this macro, the string `gcc_compiled.:' is output. This - string is calculated to define a symbol which, on BSD systems, will never be - defined for any other reason. GDB checks for the presence of this symbol - when reading the symbol table of an executable. - - On non-BSD systems, you must arrange communication with GDB in some other - fashion. If GDB is not used on your system, you can define this macro with - an empty body. - - Defined in svr4.h. */ -/* #define ASM_IDENTIFY_GCC(FILE) */ - -/* Like ASM_IDENTIFY_GCC, but used when dbx debugging is selected to emit - a stab the debugger uses to identify gcc as the compiler that is emitted - after the stabs for the filename, which makes it easier for GDB to parse. - - Defined in svr4.h. */ -/* #define ASM_IDENTIFY_GCC_AFTER_SOURCE(FILE) */ - /* A C string constant describing how to begin a comment in the target assembler language. The compiler assumes that the comment will end at the end of the line. */ diff --git a/gcc/config/dbxelf.h b/gcc/config/dbxelf.h index 57d97a6..8a2c266 100644 --- a/gcc/config/dbxelf.h +++ b/gcc/config/dbxelf.h @@ -54,28 +54,6 @@ Boston, MA 02111-1307, USA. */ #define DBX_CONTIN_LENGTH 0 #endif -/* When using stabs, gcc2_compiled must be a stabs entry, not an - ordinary symbol, or gdb won't see it. Furthermore, since gdb reads - the input piecemeal, starting with each N_SO, it's a lot easier if - the gcc2 flag symbol is *after* the N_SO rather than before it. So - we emit an N_OPT stab there. */ - -#define ASM_IDENTIFY_GCC(FILE) \ -do \ - { \ - if (write_symbols != DBX_DEBUG) \ - fputs ("gcc2_compiled.:\n", FILE); \ - } \ -while (0) - -#define ASM_IDENTIFY_GCC_AFTER_SOURCE(FILE) \ -do \ - { \ - if (write_symbols == DBX_DEBUG) \ - fputs ("\t.stabs\t\"gcc2_compiled.\", 0x3c, 0, 0, 0\n", FILE); \ - } \ -while (0) - /* Like block addresses, stabs line numbers are relative to the current function. */ diff --git a/gcc/config/dsp16xx/dsp16xx.h b/gcc/config/dsp16xx/dsp16xx.h index 86ff76f..8aa0556 100644 --- a/gcc/config/dsp16xx/dsp16xx.h +++ b/gcc/config/dsp16xx/dsp16xx.h @@ -1599,9 +1599,6 @@ const_section () \ /* Output at beginning of assembler file. */ #define ASM_FILE_START(FILE) dsp16xx_file_start () -/* Prevent output of .gcc_compiled */ -#define ASM_IDENTIFY_GCC(FILE) - /* A C string constant describing how to begin a comment in the target assembler language. */ /* define ASM_COMMENT_START */ diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index 4573085..e7b9b81 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -94,23 +94,8 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME); -/* Attach a special .ident directive to the end of the file to identify - the version of GCC which compiled this code. The format of the - .ident string is patterned after the ones produced by native svr4 - C compilers. */ - #define IDENT_ASM_OP "\t.ident\t" -#undef ASM_FILE_END -#define ASM_FILE_END(FILE) \ - do \ - { \ - if (!flag_no_ident) \ - fprintf ((FILE), "%s\"GCC: (GNU) %s\"\n", \ - IDENT_ASM_OP, version_string); \ - } \ - while (0) - #undef ASM_BYTE_OP #define ASM_BYTE_OP "\t.byte\t" diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h index 98a5c9e..18065c0 100644 --- a/gcc/config/freebsd.h +++ b/gcc/config/freebsd.h @@ -101,9 +101,6 @@ Boston, MA 02111-1307, USA. */ #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG -/* Attach a special .ident directive to the end of the file to identify - the version of GCC which compiled this code. The format of the .ident - string is patterned after the ones produced by native SVR4 C compilers. */ #undef IDENT_ASM_OP #define IDENT_ASM_OP "\t.ident\t" @@ -112,20 +109,6 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf ((FILE), "%s\"%s\"\n", IDENT_ASM_OP, (NAME)); -#undef ASM_IDENTIFY_LANGUAGE -#define ASM_IDENTIFY_LANGUAGE(FILE) \ - fprintf ((FILE), "%s\"GCC (%s) %s\"\n", IDENT_ASM_OP, \ - lang_identify (), version_string) - -#undef ASM_FILE_END -#define ASM_FILE_END(FILE) \ -do { \ - if (!flag_no_ident) \ - fprintf ((FILE), "%s\"GCC: (GNU) %s\"\n", \ - IDENT_ASM_OP, version_string); \ - } while (0) - - /* Miscellaneous parameters. */ /* Don't assume anything about the header files. */ diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index a0862c5..68747ac 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -1068,8 +1068,6 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS) /* Control the assembler format that we output. */ -#define ASM_IDENTIFY_GCC(FILE) /* nothing */ - /* Output at beginning/end of assembler file. */ #define ASM_FILE_START(FILE) asm_file_start(FILE) diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h index 8967d0b..6bb638b 100644 --- a/gcc/config/i370/i370.h +++ b/gcc/config/i370/i370.h @@ -1091,7 +1091,6 @@ enum reg_class fputs ("\tCSECT\n", FILE); } #define ASM_FILE_END(FILE) fputs ("\tEND\n", FILE); -#define ASM_IDENTIFY_GCC(FILE) #define ASM_COMMENT_START "*" #define ASM_APP_OFF "" #define ASM_APP_ON "" diff --git a/gcc/config/i386/att.h b/gcc/config/i386/att.h index e04b035..d8cf65a 100644 --- a/gcc/config/i386/att.h +++ b/gcc/config/i386/att.h @@ -56,7 +56,6 @@ do \ output_file_directive (FILE, main_input_filename); \ if (target_flags & MASK_INTEL_SYNTAX) \ fputs ("\t.intel_syntax\n", FILE); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ } while (0) /* Do use .optim by default on this machine. */ diff --git a/gcc/config/i386/beos-elf.h b/gcc/config/i386/beos-elf.h index 5b980b6..2ed31de 100644 --- a/gcc/config/i386/beos-elf.h +++ b/gcc/config/i386/beos-elf.h @@ -265,15 +265,3 @@ Boston, MA 02111-1307, USA. */ without user intervention. For instance, under Microsoft Windows symbols must be explicitly imported from shared libraries (DLLs). */ #define MULTIPLE_SYMBOL_SPACES - -/* A C statement to output assembler commands which will identify the object - file as having been compiled with GNU CC. This isn't needed for BeOS - because we use DWARF and DWARF has an DW_AT_producer tag that does the - same thing. BeOS debuggers, like bdb, that don't know about this hack - can get confused when they find two symbols with the same address, and - print the wrong one (gcc2_compiled) in things like backtraces. The most - likely ill effect of disabling this is that a BeOS port of gdb would not - be able to tell that an executable was compiled with gcc if there was no - DWARF info. */ -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) diff --git a/gcc/config/i386/dgux.c b/gcc/config/i386/dgux.c index 60e36b4..e9d2b51 100644 --- a/gcc/config/i386/dgux.c +++ b/gcc/config/i386/dgux.c @@ -120,8 +120,8 @@ output_file_start (file, f_options, f_len, W_options, W_len) output_file_directive (file, main_input_filename); fprintf (file, "\t.version\t\"01.01\"\n"); \ - /* Switch to the data section so that the coffsem symbol and the - gcc2_compiled. symbol aren't in the text section. */ + /* Switch to the data section so that the coffsem symbol + isn't in the text section. */ data_section (); pos = fprintf (file, "\n// cc1 (%s) arguments:", VERSION_STRING); diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h index cef4385..6c28bf9 100644 --- a/gcc/config/i386/gas.h +++ b/gcc/config/i386/gas.h @@ -169,5 +169,4 @@ Boston, MA 02111-1307, USA. */ if (target_flags & MASK_INTEL_SYNTAX) \ fputs ("\t.intel_syntax\n", FILE); \ output_file_directive (FILE, main_input_filename); \ - fputs ("\t.version\t\"01.01\"\n", FILE); \ } while (0) diff --git a/gcc/config/i386/i386afe.h b/gcc/config/i386/i386afe.h index b40be84..e69de29 100644 --- a/gcc/config/i386/i386afe.h +++ b/gcc/config/i386/i386afe.h @@ -1,37 +0,0 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. - -This file is part of GNU CC. - -GNU CC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU CC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ - -/* Irritatingly, config/elfos.h defines its own version of ASM_FILE_END, - conflicting with a definition which we wish to have in i386/i386.h. - We _really_ need to clean up the hodge-podge of random macro placement - in the configury... */ - -/* This macro is invoked at the end of compilation. It is used here to - output code for -fpic that will load the return address into %ebx. */ - -#undef ASM_FILE_END -#define ASM_FILE_END(FILE) \ - do \ - { \ - ix86_asm_file_end (FILE); \ - if (!flag_no_ident) \ - fprintf ((FILE), "%s\"GCC: (GNU) %s\"\n", \ - IDENT_ASM_OP, version_string); \ - } \ - while (0) diff --git a/gcc/config/i386/i386elf.h b/gcc/config/i386/i386elf.h index 730761f..dc9d10c 100644 --- a/gcc/config/i386/i386elf.h +++ b/gcc/config/i386/i386elf.h @@ -101,16 +101,6 @@ do { long value[3]; \ } \ } while (0) -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ - -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) \ (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 138a246..0ec749d 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -30,7 +30,6 @@ Boston, MA 02111-1307, USA. */ output_file_directive (FILE, main_input_filename); \ if (target_flags & MASK_INTEL_SYNTAX) \ fputs ("\t.intel_syntax\n", FILE); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ } while (0) #undef TARGET_VERSION diff --git a/gcc/config/i386/osf1elf.h b/gcc/config/i386/osf1elf.h index 8282953..5aee6fa 100644 --- a/gcc/config/i386/osf1elf.h +++ b/gcc/config/i386/osf1elf.h @@ -85,21 +85,6 @@ #undef LIBGCC_SPEC #define LIBGCC_SPEC "%{!shared:%{!symbolic:libgcc.a%s}}" -/* A C statement to output assembler commands which will identify the object - file as having been compile with GNU CC. We don't need or want this for - OSF1. */ -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) - -/* Identify the front-end which produced this file. To keep symbol - space down, and not confuse kdb, only do this if the language is - not C. */ -#define ASM_IDENTIFY_LANGUAGE(STREAM) \ -{ \ - if (strcmp (lang_identify (), "c") != 0) \ - output_lang_identify (STREAM); \ -} - /* Specify size_t, ptrdiff_t, and wchar_t types. */ #undef SIZE_TYPE #undef PTRDIFF_TYPE diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h index 1f86883..138ef67 100644 --- a/gcc/config/i386/osfrose.h +++ b/gcc/config/i386/osfrose.h @@ -740,11 +740,6 @@ do \ } \ while (0) -/* Attach a special .ident directive to the end of the file to identify - the version of GCC which compiled this code. The format of the - .ident string is patterned after the ones produced by native svr4 - C compilers. */ - #define IDENT_ASM_OP "\t.ident\t" /* Allow #sccs in preprocessor. */ @@ -759,98 +754,6 @@ do \ if (HALF_PIC_P ()) \ HALF_PIC_FINISH (STREAM); \ ix86_asm_file_end (STREAM); \ - if (!flag_no_ident) \ - { \ - char *fstart = main_input_filename; \ - char *fname; \ - \ - if (!fstart) \ - fstart = "<no file>"; \ - \ - fname = fstart + strlen (fstart) - 1; \ - while (fname > fstart && *fname != '/') \ - fname--; \ - \ - if (*fname == '/') \ - fname++; \ - \ - fprintf ((STREAM), "%s\"GCC: (GNU) %s %s -O%d", \ - IDENT_ASM_OP, version_string, fname, optimize); \ - \ - if (write_symbols == PREFERRED_DEBUGGING_TYPE) \ - fprintf ((STREAM), " -g%d", (int)debug_info_level); \ - \ - else if (write_symbols == DBX_DEBUG) \ - fprintf ((STREAM), " -gstabs%d", (int)debug_info_level); \ - \ - else if (write_symbols == DWARF_DEBUG) \ - fprintf ((STREAM), " -gdwarf%d", (int)debug_info_level); \ - \ - else if (write_symbols != NO_DEBUG) \ - fprintf ((STREAM), " -g??%d", (int)debug_info_level); \ - \ - if (flag_omit_frame_pointer) \ - fprintf ((STREAM), " -fomit-frame-pointer"); \ - \ - if (flag_strength_reduce) \ - fprintf ((STREAM), " -fstrength-reduce"); \ - \ - if (flag_unroll_loops) \ - fprintf ((STREAM), " -funroll-loops"); \ - \ - if (flag_schedule_insns) \ - fprintf ((STREAM), " -fschedule-insns"); \ - \ - if (flag_schedule_insns_after_reload) \ - fprintf ((STREAM), " -fschedule-insns2"); \ - \ - if (flag_force_mem) \ - fprintf ((STREAM), " -fforce-mem"); \ - \ - if (flag_force_addr) \ - fprintf ((STREAM), " -fforce-addr"); \ - \ - if (flag_inline_functions) \ - fprintf ((STREAM), " -finline-functions"); \ - \ - if (flag_caller_saves) \ - fprintf ((STREAM), " -fcaller-saves"); \ - \ - if (flag_pic) \ - fprintf ((STREAM), (flag_pic > 1) ? " -fPIC" : " -fpic"); \ - \ - if (flag_inhibit_size_directive) \ - fprintf ((STREAM), " -finhibit-size-directive"); \ - \ - if (flag_gnu_linker) \ - fprintf ((STREAM), " -fgnu-linker"); \ - \ - if (profile_flag) \ - fprintf ((STREAM), " -p"); \ - \ - if (profile_block_flag) \ - fprintf ((STREAM), " -a"); \ - \ - if (TARGET_IEEE_FP) \ - fprintf ((STREAM), " -mieee-fp"); \ - \ - if (TARGET_HALF_PIC) \ - fprintf ((STREAM), " -mhalf-pic"); \ - \ - if (!TARGET_MOVE) \ - fprintf ((STREAM), " -mno-move"); \ - \ - if (TARGET_386) \ - fprintf ((STREAM), " -m386"); \ - \ - else if (TARGET_486) \ - fprintf ((STREAM), " -m486"); \ - \ - else \ - fprintf ((STREAM), " -munknown-machine"); \ - \ - fprintf ((STREAM), (TARGET_ELF) ? " -melf\"\n" : " -mrose\"\n"); \ - } \ } \ while (0) @@ -866,21 +769,6 @@ while (0) to do the search */ #define LINK_LIBGCC_SPECIAL -/* A C statement to output assembler commands which will identify the object - file as having been compile with GNU CC. We don't need or want this for - OSF1. GDB doesn't need it and kdb doesn't like it */ -#define ASM_IDENTIFY_GCC(FILE) - -/* Identify the front-end which produced this file. To keep symbol - space down, and not confuse kdb, only do this if the language is - not C. */ - -#define ASM_IDENTIFY_LANGUAGE(STREAM) \ -{ \ - if (strcmp (lang_identify (), "c") != 0) \ - output_lang_identify (STREAM); \ -} - /* Generate calls to memcpy, etc., not bcopy, etc. */ #define TARGET_MEM_FUNCTIONS diff --git a/gcc/config/i386/ptx4-i.h b/gcc/config/i386/ptx4-i.h index 0d4b33e..9cee54c 100644 --- a/gcc/config/i386/ptx4-i.h +++ b/gcc/config/i386/ptx4-i.h @@ -98,16 +98,6 @@ do { long value[3]; \ } \ } while (0) -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ - -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h index 039b26a..235b7c8 100644 --- a/gcc/config/i386/sco5.h +++ b/gcc/config/i386/sco5.h @@ -210,15 +210,6 @@ do { \ fprintf ((FILE), "\t.version\t\"01.01\"\n"); \ } while (0) -#undef ASM_FILE_END -#define ASM_FILE_END(FILE) \ -do { \ - ix86_asm_file_end (FILE); \ - if (!flag_no_ident) \ - fprintf ((FILE), "%s\"GCC: (GNU) %s\"\n", \ - IDENT_ASM_OP, version_string); \ -} while (0) - #undef ASM_FINISH_DECLARE_OBJECT #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ do { \ diff --git a/gcc/config/ia64/sysv4.h b/gcc/config/ia64/sysv4.h index f4e4075..99f561c 100644 --- a/gcc/config/ia64/sysv4.h +++ b/gcc/config/ia64/sysv4.h @@ -133,13 +133,6 @@ while (0) #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE 32 -/* We don't want any symbol at the beginning of the file. This is defined in - dbxelf.h which is included from elfos.h, so we need to undef/define it - here. */ - -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) - /* We redefine this to use the ia64 .proc pseudo-op. */ #undef ASM_DECLARE_FUNCTION_NAME diff --git a/gcc/config/linux.h b/gcc/config/linux.h index 1ef26b3..1a69758 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -47,15 +47,6 @@ Boston, MA 02111-1307, USA. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add the GNU/Linux magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static diff --git a/gcc/config/m68k/3b1.h b/gcc/config/m68k/3b1.h index 739a28b..0dac874 100644 --- a/gcc/config/m68k/3b1.h +++ b/gcc/config/m68k/3b1.h @@ -64,10 +64,6 @@ Boston, MA 02111-1307, USA. */ #define ASM_FILE_START(FILE) \ output_file_directive ((FILE), main_input_filename) -/* Don't try to define `gcc_compiled.' since the assembler might not - accept symbols with periods and GDB doesn't run on this machine anyway. */ -#define ASM_IDENTIFY_GCC(FILE) - /* Define __HAVE_68881__ in preprocessor if -m68881 is specified. This will control the use of inline 68881 insns in certain macros. */ diff --git a/gcc/config/m68k/auxgas.h b/gcc/config/m68k/auxgas.h index c2e0d56..c3c7635 100644 --- a/gcc/config/m68k/auxgas.h +++ b/gcc/config/m68k/auxgas.h @@ -31,14 +31,6 @@ Boston, MA 02111-1307, USA. */ #define ASM_OUTPUT_IDENT(FILE, NAME) \ fprintf (FILE, "\t.ident \"%s\"\n", NAME); -#ifdef IDENTIFY_WITH_IDENT -/* Put the GCC identification somewhere nicer, I think. - Does the COFF GDB use the "gcc2_complied." symbol anyway? */ -#define ASM_IDENTIFY_GCC(FILE) /* nothing */ -#define ASM_IDENTIFY_LANGUAGE(FILE) \ - fprintf (FILE, "\t.ident \"GCC (%s) %s\"\n", lang_identify(), version_string) -#endif - #ifdef USE_COLLECT2 #undef ASM_OUTPUT_CONSTRUCTOR #undef ASM_OUTPUT_DESTRUCTOR diff --git a/gcc/config/m68k/crds.h b/gcc/config/m68k/crds.h index b3e8078..12f0fb7 100644 --- a/gcc/config/m68k/crds.h +++ b/gcc/config/m68k/crds.h @@ -90,10 +90,6 @@ Boston, MA 02111-1307, USA. */ #define TARGET_MEM_FUNCTIONS -/* Don't try to define `gcc_compiled.' since the assembler might not - accept symbols with periods and GDB doesn't run on this machine anyway. */ -#define ASM_IDENTIFY_GCC(FILE) - /* Define __HAVE_68881__ in preprocessor if -m68881 is specified. This will control the use of inline 68881 insns in certain macros. */ diff --git a/gcc/config/m68k/hp320.h b/gcc/config/m68k/hp320.h index 8314005..64a0e0d 100644 --- a/gcc/config/m68k/hp320.h +++ b/gcc/config/m68k/hp320.h @@ -607,10 +607,6 @@ do { register int i; \ { fprintf ((FILE), "mov"); (PTR) += 4; } \ } -/* Prevent output of `gcc_compiled.:'. */ - -#define ASM_IDENTIFY_GCC(FILE) - #else /* not HPUX_ASM */ #undef FUNCTION_PROFILER diff --git a/gcc/config/m68k/m68kv4.h b/gcc/config/m68k/m68kv4.h index dafe7fd..9bdc487 100644 --- a/gcc/config/m68k/m68kv4.h +++ b/gcc/config/m68k/m68kv4.h @@ -27,11 +27,6 @@ Boston, MA 02111-1307, USA. */ #include "m68k/sgs.h" /* The m68k/SVR4 assembler is SGS based */ -/* The SGS assembler requires a special definition of - ASM_IDENTIFY_GCC. We combine the m68k/sgs.h and the svr4.h - definitions below. */ -#undef ASM_IDENTIFY_GCC - #include "svr4.h" /* Pick up the generic SVR4 macros */ /* See m68k.h. 7 means 68020 with 68881. */ @@ -40,19 +35,6 @@ Boston, MA 02111-1307, USA. */ #define TARGET_DEFAULT (MASK_BITFIELD|MASK_68881|MASK_68020) #endif -/* When using an SGS assembler, modify the name of the artificial label which - identifies this file as having been compiled with gcc, and the macro that - emits such a label in the assembly output, to use '%' rather than '.' */ - -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) \ -do \ - { \ - if (write_symbols != DBX_DEBUG) \ - fputs ("gcc2_compiled%:\n", FILE); \ - } \ -while (0) - /* Override the definition of NO_DOLLAR_IN_LABEL in svr4.h, for special g++ assembler names. When this is defined, g++ uses embedded '.' characters and some m68k assemblers have problems with this. The diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h index 9c9a099..fd91481 100644 --- a/gcc/config/m68k/mot3300.h +++ b/gcc/config/m68k/mot3300.h @@ -38,6 +38,9 @@ Boston, MA 02111-1307, USA. */ #include "m68k/m68k.h" +/* GDB expects a slightly different marker on this target. */ +#define STABS_GCC_MARKER "gcc2_compiled%" + /* See m68k.h. 0407 means 68020-68040. */ #ifndef TARGET_DEFAULT @@ -264,11 +267,6 @@ dtors_section () \ } #endif /* USE_GAS */ -/* The sysV68 assembler does not accept dots in labels. - Let's use percent instead */ - -#define ASM_IDENTIFY_GCC(FILE) fputs("gcc2_compiled%:\n", FILE) - /* Names to predefine in the preprocessor for this target machine. */ /* ihnp4!lmayk!lgm@eddie.mit.edu says mc68000 and m68k should not be here, on the other hand I don't care what he says. */ diff --git a/gcc/config/m68k/news.h b/gcc/config/m68k/news.h index 5661e87..25e820e 100644 --- a/gcc/config/m68k/news.h +++ b/gcc/config/m68k/news.h @@ -139,11 +139,6 @@ Boston, MA 02111-1307, USA. */ #ifdef MOTOROLA -/* Don't try to define `gcc_compiled.' since the assembler does not - accept symbols with periods. This is no real loss since GDB only - really needs it for parms passed in registers. */ -#define ASM_IDENTIFY_GCC(FILE) - #define FUNCTION_PROLOGUE(FILE, SIZE) \ { register int regno; \ register int mask = 0; \ diff --git a/gcc/config/m68k/sgs.h b/gcc/config/m68k/sgs.h index 3e4bbb1..74716cd 100644 --- a/gcc/config/m68k/sgs.h +++ b/gcc/config/m68k/sgs.h @@ -102,13 +102,6 @@ Boston, MA 02111-1307, USA. */ #endif /* defined SUPPORT_SUN_FPA */ -/* When using an SGS assembler, modify the name of the artificial label which - identifies this file as having been compiled with gcc, and the macro that - emits such a label in the assembly output, to use '%' rather than '.' */ - -#define ASM_IDENTIFY_GCC(FILE) \ - { fprintf ((FILE), "%s:\n", "gcc2_compiled%"); } - /* This is how to output an assembler line defining an `int' constant. */ /* The SGS assembler doesn't understand ".word". */ diff --git a/gcc/config/m68k/tower-as.h b/gcc/config/m68k/tower-as.h index 2ab9422..bb03b05 100644 --- a/gcc/config/m68k/tower-as.h +++ b/gcc/config/m68k/tower-as.h @@ -67,11 +67,6 @@ Boston, MA 02111-1307, USA. */ #define SDB_DEBUGGING_INFO -/* This is only useful if gdb is changed, but doesn't harm anyway. */ - -#define ASM_IDENTIFY_GCC(FILE) \ - fprintf (FILE, "gcc2_compiled%%:\n") - /* All the ASM_OUTPUT macros need to conform to the Tower as syntax. */ #define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \ diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c index cd6f1fb..2e78848 100644 --- a/gcc/config/m88k/m88k.c +++ b/gcc/config/m88k/m88k.c @@ -1572,9 +1572,8 @@ output_file_start (file, f_options, f_len, W_options, W_len) && TARGET_SVR4) fprintf (file, "%s\n", REQUIRES_88110_ASM_OP); output_file_directive (file, main_input_filename); - /* Switch to the data section so that the coffsem symbol and the - gcc2_compiled. symbol aren't in the text section. */ - data_section (); + /* Switch to the data section so that the coffsem symbol + isn't in the text section. */ ASM_COFFSEM (file); if (TARGET_IDENTIFY_REVISION) diff --git a/gcc/config/mcore/mcore-elf.h b/gcc/config/mcore/mcore-elf.h index fce4e8b..6058d27 100644 --- a/gcc/config/mcore/mcore-elf.h +++ b/gcc/config/mcore/mcore-elf.h @@ -55,20 +55,6 @@ Boston, MA 02111-1307, USA. */ #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(REGNO) (REGNO) -/* When using stabs, gcc2_compiled must be a stabs entry, not an - ordinary symbol, or gdb won't see it. The stabs entry must be - before the N_SO in order for gdb to find it. */ -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) \ -do \ - { \ - if (write_symbols != DBX_DEBUG) \ - fputs ("gcc2_compiled.:\n", FILE); \ - else \ - fputs ("\t.stabs\t\"gcc2_compiled.\", 0x3c, 0, 0, 0\n", FILE); \ - } \ -while (0) - /* MCore defines .long and .short to NOT force any alignment. This lets you misalign as much as you wish. */ #define UNALIGNED_INT_ASM_OP "\t.long\t" diff --git a/gcc/config/mips/gnu.h b/gcc/config/mips/gnu.h index 599dc80..293f223 100644 --- a/gcc/config/mips/gnu.h +++ b/gcc/config/mips/gnu.h @@ -39,24 +39,6 @@ Boston, MA 02111-1307, USA. */ #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (MIPS GNU/ELF)"); -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - mips_asm_file_start (FILE); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - -#undef ASM_FILE_END -#define ASM_FILE_END(FILE) \ - do { \ - mips_asm_file_end(FILE); \ - if (!flag_no_ident) \ - fprintf ((FILE), "%s\"GCC: (GNU) %s\"\n", \ - IDENT_ASM_OP, version_string); \ - } while (0) - #undef ASM_OUTPUT_SOURCE_LINE #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ do { \ diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h index b7a6f8f..1540c74 100644 --- a/gcc/config/mips/iris6.h +++ b/gcc/config/mips/iris6.h @@ -128,11 +128,6 @@ Boston, MA 02111-1307, USA. */ #undef MACHINE_TYPE #define MACHINE_TYPE "SGI running IRIX 6.x" -/* The Irix 6.0.1 assembler doesn't like labels in the text section, so - just avoid emitting them. */ -#define ASM_IDENTIFY_GCC(x) ((void)0) -#define ASM_IDENTIFY_LANGUAGE(x) ((void)0) - /* Irix 5 stuff that we don't need for Irix 6. */ /* ??? We do need this for the -mabi=32 switch though. */ #undef ASM_OUTPUT_UNDEF_FUNCTION diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index e6dccb9..7e22c81 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -28,16 +28,6 @@ Boston, MA 02111-1307, USA. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - mips_asm_file_start (FILE); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - - /* Required to keep collect2.c happy */ #undef OBJECT_FORMAT_COFF diff --git a/gcc/config/mips/osfrose.h b/gcc/config/mips/osfrose.h index e9ab26b..26fc744 100644 --- a/gcc/config/mips/osfrose.h +++ b/gcc/config/mips/osfrose.h @@ -115,32 +115,3 @@ Boston, MA 02111-1307, USA. */ /* Generate calls to memcpy, etc., not bcopy, etc. */ #define TARGET_MEM_FUNCTIONS - -/* A C statement to output assembler commands which will identify - the object file as having been compiled with GNU CC (or another - GNU compiler). - - If you don't define this macro, the string `gcc2_compiled.:' is - output. This string is calculated to define a symbol which, on - BSD systems, will never be defined for any other reason. GDB - checks for the presence of this symbol when reading the symbol - table of an executable. - - On non-BSD systems, you must arrange communication with GDB in - some other fashion. If GDB is not used on your system, you can - define this macro with an empty body. - - On OSF/1, gcc2_compiled. confuses the kernel debugger, so don't - put it out. */ - -#define ASM_IDENTIFY_GCC(STREAM) - -/* Identify the front-end which produced this file. To keep symbol - space down, and not confuse kdb, only do this if the language is - not C. */ - -#define ASM_IDENTIFY_LANGUAGE(STREAM) \ -{ \ - if (strcmp (lang_identify (), "c") != 0) \ - output_lang_identify (STREAM); \ -} diff --git a/gcc/config/mips/sni-svr4.h b/gcc/config/mips/sni-svr4.h index 077b96b..702a4e4 100644 --- a/gcc/config/mips/sni-svr4.h +++ b/gcc/config/mips/sni-svr4.h @@ -68,15 +68,6 @@ Boston, MA 02111-1307, USA. */ #define NM_FLAGS "-p" -/* wir haben ein Problem, wenn in einem Assembler-File keine .text-section - erzeugt wird. Dann landen diese Pseudo-Labels in irgendeiner anderen - section, z.B. .reginfo. Das macht den ld sehr ungluecklich. */ - -#define ASM_IDENTIFY_GCC(mw_stream) \ - fprintf(mw_stream, "\t.ident \"gcc2_compiled.\"\n"); - -#define ASM_IDENTIFY_LANGUAGE(STREAM) - #define ASM_LONG ".word\t" #define ASM_GLOBAL ".rdata\n\t\t.globl\t" diff --git a/gcc/config/nextstep.h b/gcc/config/nextstep.h index 28deb16..76e1a35 100644 --- a/gcc/config/nextstep.h +++ b/gcc/config/nextstep.h @@ -208,11 +208,6 @@ Boston, MA 02111-1307, USA. */ /* Define our object format type for crtstuff.c */ #define OBJECT_FORMAT_MACHO -/* Don't use .gcc_compiled symbols to communicate with GDB; - They interfere with numerically sorted symbol lists. */ - -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(asm_out_file) #undef INIT_SECTION_ASM_OP #define INIT_SECTION_ASM_OP #undef INVOKE__main diff --git a/gcc/config/pa/lib2funcs.asm b/gcc/config/pa/lib2funcs.asm index d2a0f76..bf632d5 100644 --- a/gcc/config/pa/lib2funcs.asm +++ b/gcc/config/pa/lib2funcs.asm @@ -37,7 +37,6 @@ .SUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,SORT=8 .IMPORT $$dyncall,MILLICODE -; gcc_compiled.: .SPACE $TEXT$ .SUBSPA $CODE$ diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h index bc7269c..9f688e9 100644 --- a/gcc/config/pa/som.h +++ b/gcc/config/pa/som.h @@ -26,12 +26,6 @@ Boston, MA 02111-1307, USA. */ from other embedded stabs implementations. */ #undef DBX_USE_BINCL -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) - -#undef ASM_IDENTIFY_GCC_AFTER_SOURCE -#define ASM_IDENTIFY_GCC_AFTER_SOURCE(FILE) - /* We make the first line stab special to avoid adding several gross hacks to GAS. */ #undef ASM_OUTPUT_SOURCE_LINE diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 39aac2f..08b7849 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -1245,10 +1245,6 @@ fprintf (FILE, "$help$: . = .+8 ; space for tmp moves!\n") \ fprintf (FILE, "\tmov (sp)+, %s\n", reg_names[REGNO]) \ ) - -#define ASM_IDENTIFY_GCC(FILE) \ - fprintf(FILE, "gcc_compiled:\n") - /* trampoline - how should i do it in separate i+d ? have some allocate_trampoline magic??? diff --git a/gcc/config/psos.h b/gcc/config/psos.h index cb739fe..361c5bb 100644 --- a/gcc/config/psos.h +++ b/gcc/config/psos.h @@ -67,18 +67,6 @@ Boston, MA 02111-1307, USA. #define TARGET_MEM_FUNCTIONS - -/* When using stabs, gcc2_compiled must be a stabs entry, not an - ordinary symbol, or gdb won't see it. The stabs entry must be - before the N_SO in order for gdb to find it. */ - -#define ASM_IDENTIFY_GCC(FILE) \ -do \ - { \ - fputs (".stabs \"gcc2_compiled.\", 0x3c, 0, 0, 0\n", FILE); \ - } \ -while (0) - /* This is how we tell the assembler that a symbol is weak. */ #define ASM_WEAKEN_LABEL(FILE,NAME) \ diff --git a/gcc/config/ptx4.h b/gcc/config/ptx4.h index c710874..57b0464 100644 --- a/gcc/config/ptx4.h +++ b/gcc/config/ptx4.h @@ -204,21 +204,6 @@ Boston, MA 02111-1307, USA. #undef DBX_REGISTER_NUMBER -/* When using stabs, gcc2_compiled must be a stabs entry, not an - ordinary symbol, or gdb won't see it. The stabs entry must be - before the N_SO in order for gdb to find it. */ - -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) \ -do \ - { \ - if (write_symbols != DBX_DEBUG) \ - fputs ("gcc2_compiled.:\n", FILE); \ - else \ - fputs ("\t.stabs\t\"gcc2_compiled.\", 0x3c, 0, 0, 0\n", FILE); \ - } \ -while (0) - /* Like block addresses, stabs line numbers are relative to the current function. */ diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h index fe9bf14..82c8744 100644 --- a/gcc/config/rs6000/aix.h +++ b/gcc/config/rs6000/aix.h @@ -405,9 +405,6 @@ toc_section () \ Also, in order to output proper .bs/.es pairs, we need at least one static [RW] section emitted. - We then switch back to text to force the gcc2_compiled. label and the space - allocated after it (when profiling) into the text section. - Finally, declare mcount when profiling to make the assembler happy. */ #define ASM_FILE_START(FILE) \ diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index d8d4ef3..29391a6 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -904,8 +904,8 @@ output_file_start (file) { output_file_directive (file, main_input_filename); - /* Switch to the data section so that the coffsem symbol and the - gcc2_compiled. symbol aren't in the text section. */ + /* Switch to the data section so that the coffsem symbol + isn't in the text section. */ data_section (); if (TARGET_LITTLE_ENDIAN) diff --git a/gcc/config/sparc/linux-aout.h b/gcc/config/sparc/linux-aout.h index 91561b0..c40c79c 100644 --- a/gcc/config/sparc/linux-aout.h +++ b/gcc/config/sparc/linux-aout.h @@ -42,11 +42,7 @@ Boston, MA 02111-1307, USA. */ /* Output at beginning of assembler file. */ /* The .file command should always begin the output. */ #undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) +#define ASM_FILE_START(FILE) output_file_directive (FILE, main_input_filename) #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}} %{static:-static}" diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index ee3b7fd..236d0e9 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -45,15 +45,6 @@ Boston, MA 02111-1307, USA. */ #undef MD_EXEC_PREFIX #undef MD_STARTFILE_PREFIX -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add the GNU/Linux magical crtbegin.o file (see crtstuff.c) which provides part of the support for getting C++ file-scope static diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index da2f4fe..94b59ee 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -44,15 +44,6 @@ Boston, MA 02111-1307, USA. */ + MASK_STACK_BIAS + MASK_APP_REGS + MASK_EPILOGUE + MASK_FPU + MASK_LONG_DOUBLE_128) #endif -/* Output at beginning of assembler file. */ -/* The .file command should always begin the output. */ -#undef ASM_FILE_START -#define ASM_FILE_START(FILE) \ - do { \ - output_file_directive (FILE, main_input_filename); \ - fprintf (FILE, "\t.version\t\"01.01\"\n"); \ - } while (0) - #undef ASM_CPU_DEFAULT_SPEC #define ASM_CPU_DEFAULT_SPEC "-Av9a" diff --git a/gcc/config/sparc/sp64-elf.h b/gcc/config/sparc/sp64-elf.h index 1a7623b..cdd8f4c 100644 --- a/gcc/config/sparc/sp64-elf.h +++ b/gcc/config/sparc/sp64-elf.h @@ -119,11 +119,6 @@ crtbegin.o%s \ #undef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG -/* Stabs doesn't use this, and it confuses a simulator. */ -/* ??? Need to see what DWARF needs, if anything. */ -#undef ASM_IDENTIFY_GCC -#define ASM_IDENTIFY_GCC(FILE) - /* Define the names of various pseudo-ops used by the Sparc/svr4 assembler. */ #define UNALIGNED_DOUBLE_INT_ASM_OP "\t.uaxword\t" diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h index 06b6d21..6fffc83 100644 --- a/gcc/config/vax/vax.h +++ b/gcc/config/vax/vax.h @@ -1018,8 +1018,17 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; /* Control the assembler format that we output. */ /* Output at beginning of assembler file. */ +/* When debugging, we want to output an extra dummy label so that gas + can distinguish between D_float and G_float prior to processing the + .stabs directive identifying type double. */ + +#define ASM_FILE_START(FILE) \ + do { \ + fputs (ASM_APP_OFF, FILE); \ + if (write_symbols == DBX_DEBUG) \ + fprintf (FILE, "___vax_%c_doubles:\n", ASM_DOUBLE_CHAR); \ + } while (0) -#define ASM_FILE_START(FILE) fprintf (FILE, "#NO_APP\n"); /* Output to assembler file text saying following lines may contain character constants, extra white space, comments, etc. */ @@ -1208,17 +1217,6 @@ do { char dstr[30]; \ ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) -/* When debugging, we want to output an extra dummy label so that gas - can distinguish between D_float and G_float prior to processing the - .stabs directive identifying type double. */ - -#define ASM_IDENTIFY_LANGUAGE(FILE) \ - do { \ - output_lang_identify (FILE); \ - if (write_symbols == DBX_DEBUG) \ - fprintf (FILE, "___vax_%c_doubles:\n", ASM_DOUBLE_CHAR); \ - } while (0) - /* Output code to add DELTA to the first argument, and then jump to FUNCTION. Used for C++ multiple inheritance. .mask ^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11> #conservative entry mask diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 207ba2a..75bcbdc 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -124,6 +124,13 @@ Boston, MA 02111-1307, USA. */ #define FILE_NAME_JOINER "/" #endif +/* GDB needs to know that the stabs were generated by GCC. We emit an + N_OPT stab at the beginning of the source file to indicate this. + The string is historical, and different on a very few targets. */ +#ifndef STABS_GCC_MARKER +#define STABS_GCC_MARKER "gcc2_compiled." +#endif + /* Nonzero means if the type has methods, only output debugging information if methods are actually written to the asm file. This optimization only works if the debugger can detect the special C++ @@ -416,12 +423,9 @@ dbxout_init (asm_file, input_file_name, syms) ASM_OUTPUT_INTERNAL_LABEL (asmfile, "Ltext", 0); #endif /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */ - /* Possibly output something to inform GDB that this compilation was by - GCC. It's easier for GDB to parse it when after the N_SO's. This - is used in Solaris 2. */ -#ifdef ASM_IDENTIFY_GCC_AFTER_SOURCE - ASM_IDENTIFY_GCC_AFTER_SOURCE (asmfile); -#endif + /* Emit an N_OPT stab to indicate that this file was compiled by GCC. */ + fprintf (asmfile, "%s\"%s\",%d,0,0,0\n", + ASM_STABS_OP, STABS_GCC_MARKER, N_OPT); lastfile = input_file_name; diff --git a/gcc/defaults.h b/gcc/defaults.h index 3f040a4..008fa90 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -102,16 +102,6 @@ do { ASM_OUTPUT_LABEL(FILE,LABEL_ALTERNATE_NAME (INSN)); } while (0) while (0) #endif -#ifndef ASM_IDENTIFY_GCC - /* Default the definition, only if ASM_IDENTIFY_GCC is not set, - because if it is set, we might not want ASM_IDENTIFY_LANGUAGE - outputting labels, if we do want it to, then it must be defined - in the tm.h file. */ -#ifndef ASM_IDENTIFY_LANGUAGE -#define ASM_IDENTIFY_LANGUAGE(FILE) output_lang_identify (FILE); -#endif -#endif - /* This is how we tell the assembler to equate two values. */ #ifdef SET_ASM_OP #ifndef ASM_OUTPUT_DEF diff --git a/gcc/tm.texi b/gcc/tm.texi index 2b1a367..fc74a25 100644 --- a/gcc/tm.texi +++ b/gcc/tm.texi @@ -5539,22 +5539,6 @@ definition. On systems that use SDB, it is necessary to output certain commands; see @file{attasm.h}. -@findex ASM_IDENTIFY_GCC -@item ASM_IDENTIFY_GCC (@var{file}) -A C statement to output assembler commands which will identify -the object file as having been compiled with GCC (or another -GNU compiler). - -If you don't define this macro, the string @samp{gcc_compiled.:} -is output. This string is calculated to define a symbol which, -on BSD systems, will never be defined for any other reason. -GDB checks for the presence of this symbol when reading the -symbol table of an executable. - -On non-BSD systems, you must arrange communication with GDB in -some other fashion. If GDB is not used on your system, you can -define this macro with an empty body. - @findex ASM_COMMENT_START @item ASM_COMMENT_START A C string constant describing how to begin a comment in the target diff --git a/gcc/toplev.c b/gcc/toplev.c index 413fa2f..66cada9 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -160,10 +160,6 @@ static const char *decl_name PARAMS ((tree, int)); static void float_signal PARAMS ((int)) ATTRIBUTE_NORETURN; static void crash_signal PARAMS ((int)) ATTRIBUTE_NORETURN; -#ifdef ASM_IDENTIFY_LANGUAGE -/* This might or might not be used in ASM_IDENTIFY_LANGUAGE. */ -static void output_lang_identify PARAMS ((FILE *)) ATTRIBUTE_UNUSED; -#endif static void compile_file PARAMS ((const char *)); static void display_help PARAMS ((void)); static void display_target_options PARAMS ((void)); @@ -1792,21 +1788,6 @@ output_file_directive (asm_file, input_name) #endif } -#ifdef ASM_IDENTIFY_LANGUAGE -/* Routine to build language identifier for object file. */ - -static void -output_lang_identify (asm_out_file) - FILE *asm_out_file; -{ - int len = strlen (lang_identify ()) + sizeof ("__gnu_compiled_") + 1; - char *s = (char *) alloca (len); - - sprintf (s, "__gnu_compiled_%s", lang_identify ()); - ASM_OUTPUT_LABEL (asm_out_file, s); -} -#endif - /* Routine to open a dump file. Return true if the dump file is enabled. */ static int @@ -2280,18 +2261,6 @@ compile_file (name) fprintf (asm_out_file, "\n"); } #endif - - /* Output something to inform GDB that this compilation was by GCC. */ -#ifndef ASM_IDENTIFY_GCC - fprintf (asm_out_file, "gcc2_compiled.:\n"); -#else - ASM_IDENTIFY_GCC (asm_out_file); -#endif - - /* Output something to identify which front-end produced this file. */ -#ifdef ASM_IDENTIFY_LANGUAGE - ASM_IDENTIFY_LANGUAGE (asm_out_file); -#endif } /* ! flag_syntax_only */ #ifndef ASM_OUTPUT_SECTION_NAME @@ -2319,25 +2288,6 @@ compile_file (name) warning ("-ffunction-sections may affect debugging on some targets."); #endif - /* ??? Note: There used to be a conditional here - to call assemble_zeros without fail if DBX_DEBUGGING_INFO is defined. - This was to guarantee separation between gcc_compiled. and - the first function, for the sake of dbx on Suns. - However, having the extra zero here confused the Emacs - code for unexec, and might confuse other programs too. - Therefore, I took out that change. - In future versions we should find another way to solve - that dbx problem. -- rms, 23 May 93. */ - - /* Don't let the first function fall at the same address - as gcc_compiled., if profiling. */ - if (profile_flag || profile_block_flag) - { - /* It's best if we can write a nop here since some - assemblers don't tolerate zeros in the text section. */ - output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL_PTR); - } - /* If dbx symbol table desired, initialize writing it and output the predefined types. */ timevar_push (TV_SYMOUT); @@ -2473,6 +2423,15 @@ compile_file (name) ASM_FILE_END (asm_out_file); #endif + /* Attach a special .ident directive to the end of the file to identify + the version of GCC which compiled this code. The format of the .ident + string is patterned after the ones produced by native SVR4 compilers. */ +#ifdef IDENT_ASM_OP + if (!flag_no_ident) + fprintf (asm_out_file, "%s\"GCC: (GNU) %s\"\n", + IDENT_ASM_OP, version_string); +#endif + /* Language-specific end of compilation actions. */ finish_syntax: if (lang_hooks.finish) |