Commit 756f76d0 by Rainer Orth Committed by Rainer Orth

iris5.h (BSS_SECTION_ASM_OP): Define.

	* config/mips/iris5.h (BSS_SECTION_ASM_OP): Define.
	* config/mips/iris6.h (BSS_SECTION_ASM_OP): Undef.

	* config/mips/iris6.h (TARGET_ASM_NAMED_SECTION): Moved ...
	* config/mips/iris5.h: ... here.
	* config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Remove.

	* config/mips/iris6.h (EXTRA_SECTION_FUNCTIONS): Move ...
	* config/mips/iris5.h: ... here.

From-SVN: r77546
parent 426ca3ca
2004-02-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 2004-02-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/mips/iris5.h (BSS_SECTION_ASM_OP): Define.
* config/mips/iris6.h (BSS_SECTION_ASM_OP): Undef.
* config/mips/iris6.h (TARGET_ASM_NAMED_SECTION): Moved ...
* config/mips/iris5.h: ... here.
* config/mips/iris5gas.h (TARGET_ASM_NAMED_SECTION): Remove.
* config/mips/iris6.h (EXTRA_SECTION_FUNCTIONS): Move ...
* config/mips/iris5.h: ... here.
2004-02-09 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.ac: Remove default executable files before AC_PROG_CC. * configure.ac: Remove default executable files before AC_PROG_CC.
* configure: Regenerate. * configure: Regenerate.
......
...@@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,6 +29,10 @@ Boston, MA 02111-1307, USA. */
#define ABICALLS_ASM_OP "\t.option pic2" #define ABICALLS_ASM_OP "\t.option pic2"
/* Dummy definition which allows EXTRA_SECTION_FUNCTIONS to be the same
for IRIX 5 and 6. */
#define BSS_SECTION_ASM_OP "\t.data"
/* ??? This is correct, but not very useful, because there is no file that /* ??? This is correct, but not very useful, because there is no file that
uses this macro. */ uses this macro. */
/* ??? The best way to handle global constructors under ELF is to use .init /* ??? The best way to handle global constructors under ELF is to use .init
...@@ -190,6 +194,50 @@ Boston, MA 02111-1307, USA. */ ...@@ -190,6 +194,50 @@ Boston, MA 02111-1307, USA. */
#undef MIPS_DEFAULT_GVALUE #undef MIPS_DEFAULT_GVALUE
#define MIPS_DEFAULT_GVALUE 0 #define MIPS_DEFAULT_GVALUE 0
/* Switch into a generic section. */
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION irix_asm_named_section
/* Define functions to read the name and flags of the current section.
They are used by irix_asm_output_align. */
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
const char * \
current_section_name (void) \
{ \
switch (in_section) \
{ \
case no_section: return NULL; \
case in_text: return ".text"; \
case in_data: return ".data"; \
case in_bss: return ".bss"; \
case in_readonly_data: \
if (mips_abi != ABI_32 && mips_abi != ABI_O64) \
return ".rodata"; \
else \
return ".rdata"; \
case in_named: \
return in_named_name; \
} \
abort (); \
} \
\
unsigned int \
current_section_flags (void) \
{ \
switch (in_section) \
{ \
case no_section: return 0; \
case in_text: return SECTION_CODE; \
case in_data: return SECTION_WRITE; \
case in_bss: return SECTION_WRITE | SECTION_BSS; \
case in_readonly_data: return 0; \
case in_named: return get_named_section_flags (in_named_name); \
} \
abort (); \
}
/* Some assemblers have a bug that causes backslash escaped chars in .ascii /* Some assemblers have a bug that causes backslash escaped chars in .ascii
to be misassembled, so avoid it by using .byte instead. Write the original to be misassembled, so avoid it by using .byte instead. Write the original
string in a comment, partly to improve readability and partly for the sake string in a comment, partly to improve readability and partly for the sake
......
...@@ -77,10 +77,6 @@ do { \ ...@@ -77,10 +77,6 @@ do { \
fprintf (asm_out_file, "\t.etype\t0x%x;", (a)); \ fprintf (asm_out_file, "\t.etype\t0x%x;", (a)); \
} while (0) } while (0)
/* Switch into a generic section. */
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
/* Add -g to mips.h default to avoid confusing gas with local symbols /* Add -g to mips.h default to avoid confusing gas with local symbols
generated from stabs info. */ generated from stabs info. */
#undef NM_FLAGS #undef NM_FLAGS
......
...@@ -288,6 +288,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -288,6 +288,7 @@ Boston, MA 02111-1307, USA. */
and dtor lists this way, so we use -init and -fini to invoke the and dtor lists this way, so we use -init and -fini to invoke the
do_global_* functions instead of running collect2. */ do_global_* functions instead of running collect2. */
#undef BSS_SECTION_ASM_OP
#define BSS_SECTION_ASM_OP_32 "\t.data" #define BSS_SECTION_ASM_OP_32 "\t.data"
#define BSS_SECTION_ASM_OP_64 "\t.section\t.bss" #define BSS_SECTION_ASM_OP_64 "\t.section\t.bss"
#define BSS_SECTION_ASM_OP \ #define BSS_SECTION_ASM_OP \
...@@ -303,10 +304,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -303,10 +304,6 @@ Boston, MA 02111-1307, USA. */
? READONLY_DATA_SECTION_ASM_OP_64 \ ? READONLY_DATA_SECTION_ASM_OP_64 \
: READONLY_DATA_SECTION_ASM_OP_32) : READONLY_DATA_SECTION_ASM_OP_32)
/* Switch into a generic section. */
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION irix_asm_named_section
/* The default definition in defaults.h cannot cope with the runtime-variable /* The default definition in defaults.h cannot cope with the runtime-variable
definition of DWARF2_UNWIND_INFO above, so define here explicitly. */ definition of DWARF2_UNWIND_INFO above, so define here explicitly. */
#define EH_FRAME_SECTION_NAME ".eh_frame" #define EH_FRAME_SECTION_NAME ".eh_frame"
...@@ -336,46 +333,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -336,46 +333,6 @@ Boston, MA 02111-1307, USA. */
#endif /* _MIPS_SIM == _ABIO32 && !GAS */ #endif /* _MIPS_SIM == _ABIO32 && !GAS */
/* Define functions to read the name and flags of the current section.
They are used by irix_asm_output_align. */
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
const char * \
current_section_name (void) \
{ \
switch (in_section) \
{ \
case no_section: return NULL; \
case in_text: return ".text"; \
case in_data: return ".data"; \
case in_bss: return ".bss"; \
case in_readonly_data: \
if (mips_abi != ABI_32 && mips_abi != ABI_O64) \
return ".rodata"; \
else \
return ".rdata"; \
case in_named: \
return in_named_name; \
} \
abort (); \
} \
\
unsigned int \
current_section_flags (void) \
{ \
switch (in_section) \
{ \
case no_section: return 0; \
case in_text: return SECTION_CODE; \
case in_data: return SECTION_WRITE; \
case in_bss: return SECTION_WRITE | SECTION_BSS; \
case in_readonly_data: return 0; \
case in_named: return get_named_section_flags (in_named_name); \
} \
abort (); \
}
/* SGI assembler needs all sorts of extra help to do alignment properly. */ /* SGI assembler needs all sorts of extra help to do alignment properly. */
#undef ASM_OUTPUT_ALIGN #undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN irix_asm_output_align #define ASM_OUTPUT_ALIGN irix_asm_output_align
......
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