From 44404b8b955d9e7dc9932eca92991d925847ece9 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 26 Apr 2001 16:02:05 +0000 Subject: [PATCH] config.gcc (mips*-*-linux*): Add elfos.h to tm_file. 2001-04-26 H.J. Lu (hjl@gnu.org) * config.gcc (mips*-*-linux*): Add elfos.h to tm_file. * config/mips/ecoff.h (STARTFILE_SPEC): Undefine before define. * config/mips/elf64.h (MAX_OFILE_ALIGNMENT): Likewise. (ASM_OUTPUT_SECTION_NAME): Likewise. (ASM_WEAKEN_LABEL): Likewise. (UNIQUE_SECTION): Likewise. (ASM_OUTPUT_CONSTRUCTOR): Likewise. (ASM_OUTPUT_DESTRUCTOR): Likewise. * config/mips/elf.h (MAX_OFILE_ALIGNMENT): Likewise. (ASM_OUTPUT_SECTION_NAME): Likewise. (ASM_WEAKEN_LABEL): Likewise. (UNIQUE_SECTION): Likewise. (ASM_OUTPUT_CONSTRUCTOR): Likewise. (ASM_OUTPUT_DESTRUCTOR): Likewise. * config/mips/linux.h (HANDLE_SYSV_PRAGMA): Likewise. * config/mips/mips.h (DBX_CONTIN_LENGTH): Likewise. (ASM_FILE_START): Likewise. (ASM_OUTPUT_SOURCE_LINE): Likewise. (ASM_DECLARE_OBJECT_NAME): Likewise. (ASM_FILE_END): Likewise. (ASM_DECLARE_FUNCTION_NAME): Likewise. (ASM_OUTPUT_INTERNAL_LABEL): Likewise. (ASM_GENERATE_INTERNAL_LABEL): Likewise. (ASM_OUTPUT_CASE_LABEL): Likewise. (ASM_OUTPUT_SKIP): Likewise. (ASM_OUTPUT_ASCII): Likewise. (ASM_OUTPUT_IDENT): Likewise. (READONLY_DATA_SECTION): Likewise. (EXTRA_SECTIONS): Likewise. (EXTRA_SECTION_FUNCTIONS): Likewise. (SELECT_RTX_SECTION): Likewise. (SELECT_SECTION): Likewise. * config/mips/linux.h (INVOKE__main): Undefine. (CTOR_LIST_BEGIN): Likewise. (CTOR_LIST_END): Likewise. (DTOR_LIST_BEGIN): Likewise. (DTOR_LIST_END): Likewise. (SET_ASM_OP): Defined it to ".dummy". (ASM_OUTPUT_DEF): Defined. (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Defined. From-SVN: r41592 --- gcc/ChangeLog | 46 +++++++++++++++++++++++++++++++++++++++++ gcc/config.gcc | 4 ++-- gcc/config/mips/ecoff.h | 1 + gcc/config/mips/elf.h | 6 ++++++ gcc/config/mips/elf64.h | 6 ++++++ gcc/config/mips/linux.h | 36 ++++++++++++++++++++++++++++++++ gcc/config/mips/mips.h | 17 +++++++++++++++ 7 files changed, 114 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b62da11a13..3c8e684780c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,49 @@ +2001-04-26 H.J. Lu (hjl@gnu.org) + + * config.gcc (mips*-*-linux*): Add elfos.h to tm_file. + + * config/mips/ecoff.h (STARTFILE_SPEC): Undefine before + define. + * config/mips/elf64.h (MAX_OFILE_ALIGNMENT): Likewise. + (ASM_OUTPUT_SECTION_NAME): Likewise. + (ASM_WEAKEN_LABEL): Likewise. + (UNIQUE_SECTION): Likewise. + (ASM_OUTPUT_CONSTRUCTOR): Likewise. + (ASM_OUTPUT_DESTRUCTOR): Likewise. + * config/mips/elf.h (MAX_OFILE_ALIGNMENT): Likewise. + (ASM_OUTPUT_SECTION_NAME): Likewise. + (ASM_WEAKEN_LABEL): Likewise. + (UNIQUE_SECTION): Likewise. + (ASM_OUTPUT_CONSTRUCTOR): Likewise. + (ASM_OUTPUT_DESTRUCTOR): Likewise. + * config/mips/linux.h (HANDLE_SYSV_PRAGMA): Likewise. + * config/mips/mips.h (DBX_CONTIN_LENGTH): Likewise. + (ASM_FILE_START): Likewise. + (ASM_OUTPUT_SOURCE_LINE): Likewise. + (ASM_DECLARE_OBJECT_NAME): Likewise. + (ASM_FILE_END): Likewise. + (ASM_DECLARE_FUNCTION_NAME): Likewise. + (ASM_OUTPUT_INTERNAL_LABEL): Likewise. + (ASM_GENERATE_INTERNAL_LABEL): Likewise. + (ASM_OUTPUT_CASE_LABEL): Likewise. + (ASM_OUTPUT_SKIP): Likewise. + (ASM_OUTPUT_ASCII): Likewise. + (ASM_OUTPUT_IDENT): Likewise. + (READONLY_DATA_SECTION): Likewise. + (EXTRA_SECTIONS): Likewise. + (EXTRA_SECTION_FUNCTIONS): Likewise. + (SELECT_RTX_SECTION): Likewise. + (SELECT_SECTION): Likewise. + + * config/mips/linux.h (INVOKE__main): Undefine. + (CTOR_LIST_BEGIN): Likewise. + (CTOR_LIST_END): Likewise. + (DTOR_LIST_BEGIN): Likewise. + (DTOR_LIST_END): Likewise. + (SET_ASM_OP): Defined it to ".dummy". + (ASM_OUTPUT_DEF): Defined. + (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Defined. + 2001-04-26 Nick Clifton * config/arm/arm.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Define, if the diff --git a/gcc/config.gcc b/gcc/config.gcc index 8459b95d81e..29e8d0a9819 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2219,8 +2219,8 @@ mipsel-*-netbsd* | mips-dec-netbsd*) # Decstation running NetBSD mips*-*-linux*) # Linux MIPS, either endian. xmake_file=x-linux case $machine in - mips*el-*) tm_file="mips/elfl.h mips/linux.h" ;; - *) tm_file="mips/elf.h mips/linux.h" ;; + mips*el-*) tm_file="elfos.h mips/elfl.h mips/linux.h" ;; + *) tm_file="elfos.h mips/elf.h mips/linux.h" ;; esac tmake_file=t-linux extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" diff --git a/gcc/config/mips/ecoff.h b/gcc/config/mips/ecoff.h index dcc00a4b4b8..3297d7d4321 100644 --- a/gcc/config/mips/ecoff.h +++ b/gcc/config/mips/ecoff.h @@ -32,4 +32,5 @@ Boston, MA 02111-1307, USA. */ /* Don't assume anything about startfiles. The linker script will load the appropriate startfiles. */ +#undef STARTFILE_SPEC #define STARTFILE_SPEC "" diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h index fa2a285239d..34d26c773da 100644 --- a/gcc/config/mips/elf.h +++ b/gcc/config/mips/elf.h @@ -53,6 +53,7 @@ do { \ specified using the `__attribute__ ((aligned (N)))' construct. If not defined, the default value is `BIGGEST_ALIGNMENT'. */ +#undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (32768*8) /* A C statement to output something to the assembler file to switch to section @@ -60,6 +61,7 @@ do { \ NULL_TREE. Some target formats do not support arbitrary sections. Do not define this macro in such cases. */ +#undef ASM_OUTPUT_SECTION_NAME #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \ do { \ extern FILE *asm_out_text_file; \ @@ -191,6 +193,7 @@ do { \ but until that support is generally available, the 'if' below should serve. */ +#undef ASM_WEAKEN_LABEL #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0) #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \ do { \ @@ -210,6 +213,7 @@ do { \ #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) #undef UNIQUE_SECTION_P #define UNIQUE_SECTION_P(DECL) (DECL_ONE_ONLY (DECL)) +#undef UNIQUE_SECTION #define UNIQUE_SECTION(DECL,RELOC) \ do { \ int len, size, sec; \ @@ -331,6 +335,7 @@ void FN () \ /* A C statement (sans semicolon) to output an element in the table of global constructors. */ +#undef ASM_OUTPUT_CONSTRUCTOR #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { \ ctors_section (); \ @@ -342,6 +347,7 @@ void FN () \ /* A C statement (sans semicolon) to output an element in the table of global destructors. */ +#undef ASM_OUTPUT_DESTRUCTOR #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ do { \ dtors_section (); \ diff --git a/gcc/config/mips/elf64.h b/gcc/config/mips/elf64.h index f0b00372230..0636200ed4b 100644 --- a/gcc/config/mips/elf64.h +++ b/gcc/config/mips/elf64.h @@ -54,6 +54,7 @@ Boston, MA 02111-1307, USA. */ specified using the `__attribute__ ((aligned (N)))' construct. If not defined, the default value is `BIGGEST_ALIGNMENT'. */ +#undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT (32768*8) /* We need to use .esize and .etype instead of .size and .type to @@ -77,6 +78,7 @@ do { \ NULL_TREE. Some target formats do not support arbitrary sections. Do not define this macro in such cases. */ +#undef ASM_OUTPUT_SECTION_NAME #define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \ do { \ extern FILE *asm_out_text_file; \ @@ -172,6 +174,7 @@ do { \ but until that support is generally available, the 'if' below should serve. */ +#undef ASM_WEAKEN_LABEL #define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0) #define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \ do { \ @@ -191,6 +194,7 @@ do { \ #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1) #undef UNIQUE_SECTION_P #define UNIQUE_SECTION_P(DECL) (DECL_ONE_ONLY (DECL)) +#undef UNIQUE_SECTION #define UNIQUE_SECTION(DECL,RELOC) \ do { \ int len, size, sec; \ @@ -311,6 +315,7 @@ void FN () \ /* A C statement (sans semicolon) to output an element in the table of global constructors. */ +#undef ASM_OUTPUT_CONSTRUCTOR #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \ do { \ ctors_section (); \ @@ -322,6 +327,7 @@ void FN () \ /* A C statement (sans semicolon) to output an element in the table of global destructors. */ +#undef ASM_OUTPUT_DESTRUCTOR #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \ do { \ dtors_section (); \ diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index 7e22c8149b4..fc4c237c89d 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -37,6 +37,7 @@ Boston, MA 02111-1307, USA. */ /* Handle #pragma weak and #pragma pack. */ +#undef HANDLE_SYSV_PRAGMA #define HANDLE_SYSV_PRAGMA 1 /* Use more efficient ``thunks'' to implement C++ vtables. */ @@ -160,3 +161,38 @@ Boston, MA 02111-1307, USA. */ %{mabi=64: -64} \ %{!fno-PIC:%{!fno-pic:-KPIC}} \ %{fno-PIC:-non_shared} %{fno-pic:-non_shared}" + +/* We don't need those nonsenses. */ +#undef INVOKE__main +#undef CTOR_LIST_BEGIN +#undef CTOR_LIST_END +#undef DTOR_LIST_BEGIN +#undef DTOR_LIST_END + +/* The MIPS assembler has different syntax for .set. We set it to + .dummy to trap any errors. */ +#undef SET_ASM_OP +#define SET_ASM_OP "\t.dummy\t" + +/* This is how we tell the assembler that two symbols have the + same value. */ +#undef ASM_OUTPUT_DEF +#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \ + do { \ + fprintf ((FILE), "\t"); \ + assemble_name (FILE, LABEL1); \ + fprintf (FILE, "="); \ + assemble_name (FILE, LABEL2); \ + fprintf (FILE, "\n"); \ + } while (0) + +#undef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL +#define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \ + do { \ + fputc ('\t', FILE); \ + assemble_name (FILE, SY); \ + fputc ('=', FILE); \ + assemble_name (FILE, HI); \ + fputc ('-', FILE); \ + assemble_name (FILE, LO); \ + } while (0) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index cdd0009c054..08f35fa7c2d 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1086,6 +1086,7 @@ while (0) /* On Sun 4, this limit is 2048. We use 1500 to be safe, since the length can run past this up to a continuation point. */ +#undef DBX_CONTIN_LENGTH #define DBX_CONTIN_LENGTH 1500 /* How to renumber registers for dbx and gdb. */ @@ -3789,6 +3790,7 @@ while (0) declaration when the code is processed, it generates a two instruction sequence. */ +#undef ASM_FILE_START #define ASM_FILE_START(STREAM) mips_asm_file_start (STREAM) /* Output to assembler file text saying following lines @@ -4100,6 +4102,7 @@ while (0) #define LABEL_AFTER_LOC(STREAM) #endif +#undef ASM_OUTPUT_SOURCE_LINE #define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) \ mips_output_lineno (STREAM, LINE) @@ -4140,6 +4143,7 @@ do { \ If this macro is not defined, then the variable name is defined in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */ +#undef ASM_DECLARE_OBJECT_NAME #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ do \ { \ @@ -4200,6 +4204,7 @@ while (0) mips_output_external(STREAM,DECL,NAME) /* This says what to print at the end of the assembly file */ +#undef ASM_FILE_END #define ASM_FILE_END(STREAM) mips_asm_file_end(STREAM) @@ -4210,6 +4215,7 @@ while (0) Also, switch files if we are optimizing the global pointer. */ +#undef ASM_DECLARE_FUNCTION_NAME #define ASM_DECLARE_FUNCTION_NAME(STREAM,NAME,DECL) \ { \ extern FILE *asm_out_text_file; \ @@ -4232,6 +4238,7 @@ while (0) /* This is how to output an internal numbered label where PREFIX is the class of label and NUM is the number within the class. */ +#undef ASM_OUTPUT_INTERNAL_LABEL #define ASM_OUTPUT_INTERNAL_LABEL(STREAM,PREFIX,NUM) \ fprintf (STREAM, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM) @@ -4240,6 +4247,7 @@ while (0) PREFIX is the class of label and NUM is the number within the class. This is suitable for output with `assemble_name'. */ +#undef ASM_GENERATE_INTERNAL_LABEL #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf ((LABEL), "*%s%s%ld", (LOCAL_LABEL_PREFIX), (PREFIX), (long)(NUM)) @@ -4355,6 +4363,7 @@ do { \ JUMP_TABLES_IN_TEXT_SECTION, because it is not conditional. Instead, we use ASM_OUTPUT_CASE_LABEL to switch back to the .text section if appropriate. */ +#undef ASM_OUTPUT_CASE_LABEL #define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, INSN) \ do { \ if (TARGET_EMBEDDED_PIC || TARGET_MIPS16) \ @@ -4372,10 +4381,12 @@ do { \ /* This is how to output an assembler line to advance the location counter by SIZE bytes. */ +#undef ASM_OUTPUT_SKIP #define ASM_OUTPUT_SKIP(STREAM,SIZE) \ fprintf (STREAM, "\t.space\t%u\n", (SIZE)) /* This is how to output a string. */ +#undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(STREAM, STRING, LEN) \ do { \ register int i, c, len = (LEN), cur_pos = 17; \ @@ -4451,6 +4462,7 @@ do { \ #define SCCS_DIRECTIVE /* Output #ident as a in the read-only data section. */ +#undef ASM_OUTPUT_IDENT #define ASM_OUTPUT_IDENT(FILE, STRING) \ { \ const char *p = STRING; \ @@ -4469,11 +4481,13 @@ do { \ #define DATA_SECTION_ASM_OP "\t.data" /* large data */ #define SDATA_SECTION_ASM_OP "\t.sdata" /* small data */ #define RDATA_SECTION_ASM_OP "\t.rdata" /* read-only data */ +#undef READONLY_DATA_SECTION #define READONLY_DATA_SECTION rdata_section #define SMALL_DATA_SECTION sdata_section /* What other sections we support other than the normal .data/.text. */ +#undef EXTRA_SECTIONS #define EXTRA_SECTIONS in_sdata, in_rdata /* Define the additional functions to select our additional sections. */ @@ -4486,6 +4500,7 @@ do { \ if the constant is too large for sdata, and it's readonly, it will go into the .rdata section. */ +#undef EXTRA_SECTION_FUNCTIONS #define EXTRA_SECTION_FUNCTIONS \ void \ sdata_section () \ @@ -4510,8 +4525,10 @@ rdata_section () \ /* Given a decl node or constant node, choose the section to output it in and select that section. */ +#undef SELECT_RTX_SECTION #define SELECT_RTX_SECTION(MODE,RTX) mips_select_rtx_section (MODE, RTX) +#undef SELECT_SECTION #define SELECT_SECTION(DECL, RELOC) mips_select_section (DECL, RELOC) -- 2.30.2