From 518b566fe69b32aafa5b0404948d1d0134a2654b Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 18 Sep 2001 17:37:48 +0000 Subject: [PATCH] mips.c (mips_asm_file_start): Conditionalize Elf code generation only for Gnu assembler. Tue Sep 18 09:51:11 2001 Eric Christopher * config/mips/mips.c (mips_asm_file_start): Conditionalize Elf code generation only for Gnu assembler. From-SVN: r45681 --- gcc/ChangeLog | 5 +++++ gcc/config/mips/mips.c | 53 +++++++++++++++++++++++++++----------------------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 434266e..2af44d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Sep 18 09:51:11 2001 Eric Christopher + + * config/mips/mips.c (mips_asm_file_start): Conditionalize Elf + code generation only for Gnu assembler. + 2001-09-18 Catherine Moore * config/stormy16 (LIB_SPEC): Remove -lnosys. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 92d4e84..446419f 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -6106,32 +6106,37 @@ mips_asm_file_start (stream) if (TARGET_MIPS_AS && optimize && flag_delayed_branch) fprintf (stream, "\t.set\tnobopt\n"); -#ifdef OBJECT_FORMAT_ELF - /* Generate a special section to describe the ABI switches used to produce - the resultant binary. This used to be done by the assembler setting bits - in the ELF header's flags field, but we have run out of bits. GDB needs - this information in order to be able to correctly debug these binaries. - See the function mips_gdbarch_init() in gdb/mips-tdep.c. */ - switch (mips_abi) - { - case ABI_32: abi_string = "abi32"; break; - case ABI_N32: abi_string = "abiN32"; break; - case ABI_64: abi_string = "abi64"; break; - case ABI_O64: abi_string = "abiO64"; break; - case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break; - case ABI_MEABI:abi_string = TARGET_64BIT ? "meabi64" : "meabi32"; break; - default: - abort (); - } - /* Note - we use fprintf directly rather than called named_section() - because in this way we can avoid creating an allocated section. We - do not want this section to take up any space in the running - executable. */ - fprintf (stream, "\t.section .mdebug.%s\n", abi_string); + if (TARGET_GAS) + { +#if defined(OBJECT_FORMAT_ELF) + /* Generate a special section to describe the ABI switches used to + produce the resultant binary. This used to be done by the assembler + setting bits in the ELF header's flags field, but we have run out of + bits. GDB needs this information in order to be able to correctly + debug these binaries. See the function mips_gdbarch_init() in + gdb/mips-tdep.c. */ + + switch (mips_abi) + { + case ABI_32: abi_string = "abi32"; break; + case ABI_N32: abi_string = "abiN32"; break; + case ABI_64: abi_string = "abi64"; break; + case ABI_O64: abi_string = "abiO64"; break; + case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break; + case ABI_MEABI:abi_string = TARGET_64BIT ? "meabi64" : "meabi32"; break; + default: + abort (); + } + /* Note - we use fprintf directly rather than called named_section() + because in this way we can avoid creating an allocated section. We + do not want this section to take up any space in the running + executable. */ + fprintf (stream, "\t.section .mdebug.%s\n", abi_string); - /* Restore the default section. */ - fprintf (stream, "\t.previous\n"); + /* Restore the default section. */ + fprintf (stream, "\t.previous\n"); #endif + } -- 2.7.4