Skip to content

Commit

Permalink
Remove label gcc2_compiled.
Browse files Browse the repository at this point in the history
It is an old gcc behaviour to pass information to gdb. It causes duplicated symbols at the same address which is confusing.
  • Loading branch information
laqieer committed Mar 1, 2022
1 parent faa413e commit 59a34bd
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 82 deletions.
6 changes: 0 additions & 6 deletions gcc/telf.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ extern int arm_structure_size_boundary;
#define LOCAL_LABEL_PREFIX "."


/* 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 ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )

#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
Expand Down
7 changes: 0 additions & 7 deletions gcc/toplev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2118,13 +2118,6 @@ compile_file(char *name)
}
#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);
Expand Down
2 changes: 0 additions & 2 deletions gcc_arm/config/arm/aof.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
11 changes: 0 additions & 11 deletions gcc_arm/config/arm/coff.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,6 @@ arm_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)

#include "dbxcoff.h"

/* 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. */
#undef ASM_FILE_START
Expand Down
13 changes: 0 additions & 13 deletions gcc_arm/config/arm/elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,6 @@ extern int arm_valid_machine_decl_attribute ();
arm_valid_machine_decl_attribute (DECL, ATTRIBUTES, 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
Expand Down
6 changes: 0 additions & 6 deletions gcc_arm/config/arm/tcoff.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ extern int arm_structure_size_boundary;
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""

/* 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 ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )

#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
Expand Down
6 changes: 0 additions & 6 deletions gcc_arm/config/arm/telf-oabi.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ extern int arm_structure_size_boundary;
#define LOCAL_LABEL_PREFIX "."


/* 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 ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )

#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
Expand Down
6 changes: 0 additions & 6 deletions gcc_arm/config/arm/telf-oabi_020422.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ extern int arm_structure_size_boundary;
#define LOCAL_LABEL_PREFIX "."


/* 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 ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )

#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
Expand Down
6 changes: 0 additions & 6 deletions gcc_arm/config/arm/telf.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ extern int arm_structure_size_boundary;
#define LOCAL_LABEL_PREFIX "."


/* 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 ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )

#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
Expand Down
6 changes: 0 additions & 6 deletions gcc_arm/config/arm/telf_020422.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ extern int arm_structure_size_boundary;
#define LOCAL_LABEL_PREFIX "."


/* 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 ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n", LOCAL_LABEL_PREFIX )

#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
Expand Down
6 changes: 0 additions & 6 deletions gcc_arm/config/arm/tpe.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ extern int arm_structure_size_boundary;
#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX "_"

/* 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 ASM_IDENTIFY_GCC(STREAM) \
fprintf (STREAM, "%sgcc2_compiled.:\n%s", LOCAL_LABEL_PREFIX, ASM_APP_OFF )

#undef ASM_FILE_START
#define ASM_FILE_START(STREAM) \
do { \
Expand Down
7 changes: 0 additions & 7 deletions gcc_arm/toplev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2821,13 +2821,6 @@ compile_file (name)
}
#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);
Expand Down

0 comments on commit 59a34bd

Please sign in to comment.