diff options
author | Eric Christopher <echristo@redhat.com> | 2001-09-18 17:37:48 +0000 |
---|---|---|
committer | Jeffrey D. Oldham <oldham@gcc.gnu.org> | 2001-09-18 17:37:48 +0000 |
commit | 518b566fe69b32aafa5b0404948d1d0134a2654b (patch) | |
tree | a3d3e91c954b438f2f2faded0b80e039c9fd5b1f /gcc | |
parent | 8086b53c76b3134f1e9da65a1b3cc855508cb866 (diff) | |
download | gcc-518b566fe69b32aafa5b0404948d1d0134a2654b.zip gcc-518b566fe69b32aafa5b0404948d1d0134a2654b.tar.gz gcc-518b566fe69b32aafa5b0404948d1d0134a2654b.tar.bz2 |
mips.c (mips_asm_file_start): Conditionalize Elf code generation only for Gnu assembler.
Tue Sep 18 09:51:11 2001 Eric Christopher <ecechristo@redhat.com>
* config/mips/mips.c (mips_asm_file_start): Conditionalize Elf
code generation only for Gnu assembler.
From-SVN: r45681
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | 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 <ecechristo@redhat.com> + + * config/mips/mips.c (mips_asm_file_start): Conditionalize Elf + code generation only for Gnu assembler. + 2001-09-18 Catherine Moore <clm@redhat.com> * 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 + } |