
This patch restores the m68k-coff target broken by a previous
m68k cleanup patch by me.

I avoided the warning issued for the unused static function
by protecting it with #ifdef's.


2003-09-04  Bernardo Innocenti  <bernie@develer.com>

	* config/m68k/m68k.c (m68k_coff_asm_named_section): Restore
	deleted function.
	* config/m68k/coff.h (M68K_TARGET_COFF): Add flag used to
	enable coff-only code in m68k.c.


diff -u -3 -p -u -p -r1.100 m68k.c
--- config/m68k/m68k.c	22 Aug 2003 16:52:56 -0000	1.100
+++ config/m68k/m68k.c	4 Sep 2003 11:11:54 -0000
@@ -53,6 +53,9 @@ static rtx find_addr_reg (rtx);
 static const char *singlemove_string (rtx *);
 static void m68k_output_function_prologue (FILE *, HOST_WIDE_INT);
 static void m68k_output_function_epilogue (FILE *, HOST_WIDE_INT);
+#ifdef M68K_TARGET_COFF
+static void m68k_coff_asm_named_section (const char *, unsigned int);
+#endif /* M68K_TARGET_COFF */
 #ifdef HPUX_ASM
 static void m68k_hp320_internal_label (FILE *, const char *, unsigned long);
 static void m68k_hp320_file_start (void);
@@ -3341,6 +3344,25 @@ output_xorsi3 (rtx *operands)
     }
   return "eor%.l %2,%0";
 }
+
+#ifdef M68K_TARGET_COFF
+
+/* Output assembly to switch to section NAME with attribute FLAGS.  */
+
+static void
+m68k_coff_asm_named_section (const char *name, unsigned int flags)
+{
+  char flagchar;
+
+  if (flags & SECTION_WRITE)
+    flagchar = 'd';
+  else
+    flagchar = 'x';
+
+  fprintf (asm_out_file, "\t.section\t%s,\"%c\"\n", name, flagchar);
+}
+
+#endif /* M68K_TARGET_COFF */
 
 #ifdef HPUX_ASM
 static void
diff -u -3 -p -u -p -r1.14 coff.h
--- config/m68k/coff.h	21 Aug 2003 17:27:23 -0000	1.14
+++ config/m68k/coff.h	4 Sep 2003 11:11:54 -0000
@@ -22,6 +22,10 @@ Boston, MA 02111-1307, USA.  */
 /* This file is included after m68k.h by CPU COFF specific files.  It
    is not a complete target itself.  */
 
+/* Used in m68k.c to include required support code.  */
+
+#define M68K_TARGET_COFF 1
+
 /* Generate sdb debugging information.  */
 
 #define SDB_DEBUGGING_INFO 1
