Commit d0d4af87 by Mike Stump

Added front-end taggint to object files.

From-SVN: r3874
parent d1e37dc7
......@@ -47,6 +47,12 @@ lang_finish ()
{
}
char *
lang_identify ()
{
return "c";
}
/* Used by c-lex.c, but only for objc. */
tree
lookup_interface (arg)
......
......@@ -108,3 +108,13 @@ do { fprintf (FILE, "\t%s\t", ASM_SHORT); \
} \
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
......@@ -371,6 +371,12 @@ lang_finish ()
{
}
char *
lang_identify ()
{
return "objc";
}
int
lang_decode_option (p)
char *p;
......
......@@ -52,6 +52,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "rtl.h"
#include "flags.h"
#include "insn-attr.h"
#include "defaults.h"
#ifdef XCOFF_DEBUGGING_INFO
#include "xcoffout.h"
......@@ -1495,6 +1496,17 @@ output_file_directive (asm_file, input_name)
#endif
}
/* 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);
}
/* Compile an entire file of output from cpp, named NAME.
Write a file of assembly output and various debugging dumps. */
......@@ -1789,6 +1801,12 @@ compile_file (name)
#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
/* Don't let the first function fall at the same address
as gcc_compiled., if profiling. */
if (profile_flag || profile_block_flag)
......
......@@ -1427,6 +1427,9 @@ extern void init_decl_processing PROTO((void));
extern void lang_init PROTO((void));
extern void lang_finish PROTO((void));
/* Funtion to identify which front-end produced the output file. */
extern char *lang_identify PROTO((void));
/* Function called with no arguments to parse and compile the input. */
extern int yyparse PROTO((void));
/* Function called with option as argument
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment