Commit 518b566f by Eric Christopher Committed by Jeffrey D. Oldham

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
parent 8086b53c
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> 2001-09-18 Catherine Moore <clm@redhat.com>
* config/stormy16 (LIB_SPEC): Remove -lnosys. * config/stormy16 (LIB_SPEC): Remove -lnosys.
......
...@@ -6106,32 +6106,37 @@ mips_asm_file_start (stream) ...@@ -6106,32 +6106,37 @@ mips_asm_file_start (stream)
if (TARGET_MIPS_AS && optimize && flag_delayed_branch) if (TARGET_MIPS_AS && optimize && flag_delayed_branch)
fprintf (stream, "\t.set\tnobopt\n"); fprintf (stream, "\t.set\tnobopt\n");
#ifdef OBJECT_FORMAT_ELF if (TARGET_GAS)
/* 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 #if defined(OBJECT_FORMAT_ELF)
in the ELF header's flags field, but we have run out of bits. GDB needs /* Generate a special section to describe the ABI switches used to
this information in order to be able to correctly debug these binaries. produce the resultant binary. This used to be done by the assembler
See the function mips_gdbarch_init() in gdb/mips-tdep.c. */ setting bits in the ELF header's flags field, but we have run out of
switch (mips_abi) bits. GDB needs this information in order to be able to correctly
{ debug these binaries. See the function mips_gdbarch_init() in
case ABI_32: abi_string = "abi32"; break; gdb/mips-tdep.c. */
case ABI_N32: abi_string = "abiN32"; break;
case ABI_64: abi_string = "abi64"; break; switch (mips_abi)
case ABI_O64: abi_string = "abiO64"; break; {
case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break; case ABI_32: abi_string = "abi32"; break;
case ABI_MEABI:abi_string = TARGET_64BIT ? "meabi64" : "meabi32"; break; case ABI_N32: abi_string = "abiN32"; break;
default: case ABI_64: abi_string = "abi64"; break;
abort (); case ABI_O64: abi_string = "abiO64"; break;
} case ABI_EABI: abi_string = TARGET_64BIT ? "eabi64" : "eabi32"; break;
/* Note - we use fprintf directly rather than called named_section() case ABI_MEABI:abi_string = TARGET_64BIT ? "meabi64" : "meabi32"; break;
because in this way we can avoid creating an allocated section. We default:
do not want this section to take up any space in the running abort ();
executable. */ }
fprintf (stream, "\t.section .mdebug.%s\n", abi_string); /* 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. */ /* Restore the default section. */
fprintf (stream, "\t.previous\n"); fprintf (stream, "\t.previous\n");
#endif #endif
}
......
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