OSDN Git Service

Tue Sep 18 09:51:11 2001 Eric Christopher <ecechristo@redhat.com>
authoroldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Sep 2001 17:37:48 +0000 (17:37 +0000)
committeroldham <oldham@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Sep 2001 17:37:48 +0000 (17:37 +0000)
        * config/mips/mips.c (mips_asm_file_start): Conditionalize Elf
        code generation only for Gnu assembler.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45681 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips.c

index 434266e..2af44d4 100644 (file)
@@ -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.
index 92d4e84..446419f 100644 (file)
@@ -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
+    }