This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Remove gas and ld support for MIPS ECOFF


I think the time has finally come to remove GAS and LD support for MIPS ECOFF.
In the past there was talk of removing MIPS ECOFF entirely, but the response
was that some people still need it for bootloaders and the like.  However,
they said that they build the loader as an ELF file and convert it to
ECOFF at the end, which definitely seems like the best approach.
So here I'm just removing the GAS and LD support but keeping binutils.

As things stand, the ECOFF support has been bitrotting for over 10 years.
Evidence of this is in the mips.exp comment:

    # LOSE: As of 2002-02-08, "beq" through "bltu" fail for target mips-ecoff.
    # See http://sources.redhat.com/ml/binutils/2001-10/msg00418.html for
    # more information.  Not sure if the fixes there are correct; should
    # branches to external labels be allowed for ECOFF?

And this is the problem.  We can match whatever the mips-ecoff assembler
happens to produce for a test, but without really knowing whether it's
right or not.  That just becomes a meaningless maintenance burden.
This is particularly true given:

      if (!IS_ELF)
	{
	  /* A gruesome hack which is a result of the gruesome gas
	     reloc handling.  What's worse, for COFF (as opposed to
	     ECOFF), we might need yet another copy of reloc->address.
	     See bfd_install_relocation.  */
	  reloc->addend += reloc->address;
	}

We once had a similar hack for ELF and had to keep extending it to
cope with more and more corner cases.  Although the requirements are
probably different for COFF, I still doubt that this code handles
everything correctly.

As things stand, we've had 100+ tests failing on mips-ecoff for years,
so testing on that target doesn't really serve any purpose.

This patch just removes what I see as the "core" MIPS ECOFF support.
The next two patches make the MIPS source "ELF only".

The affected targets are:

- mips*-*-ecoff* itself
- mips*-*-irix*, v4 and earlier only
- mips*-*-lnews*
- mips*-*-osf*
- mips*-*-pe*
- mips*-*-riscos*
- mips*-*-ultrix*
- mips-sony-bsd (no other mips*-*-bsd was accepted by gas)

Tested on:

  mips64-elf mips64el-linux-gnu mips64-linux-gnu mips-ecoff mips-freebsd
  mipsisa32-elf mipsisa32el-linux-gnu mipsisa32-linux-gnu mipsisa64el-elf
  mipsisa64-elf mips-kfreebsd-gnu mips-netbsd mips-sde-elf mips-sgi-irix5
  mips-sgi-irix6 mips-wrs-vxworks

Applied.

After this patch there's not really any point running the testsuite
for mips-ecoff.  All that's left are a few binutils tests that fail
due to lack of assembler support.

Richard


	* configure.ac (mips*-*-bsd*, mips*-*-ultrix*, mips*-*-osf*)
	(mips*-*-ecoff*, mips*-*-pe*, mips*-*-irix* [v4 and earlier])
	(mips*-*-lnews*, mips*-*-riscos*): Add gas and ld to noconfigdirs.
	* configure: Regenerate.

gas/
	* NEWS: Note removal of ECOFF support.
	* doc/as.texinfo (--emulation): Update for the removal of MIPS ECOFF.
	* Makefile.am (TARG_ENV_HFILES): Remove config/te-lnews.h.
	(MULTI_CFILES): Remove config/e-mipsecoff.c.
	* Makefile.in: Regenerate.
	* configure.in: Remove MIPS ECOFF references.
	(mips-sony-bsd*, mips-*-bsd*, mips-*-lnews*-ecoff, mips-*-*-ecoff):
	Delete cases.
	(mips-*-irix5*-*, mips*-*-linux*-*, mips*-*-freebsd*)
	(mips*-*-kfreebsd*-gnu, mips-*-*-elf): Fold into...
	(mips-*-*): ...this single case.
	(mipsbecoff, mipslecoff, mipsecoff): Remove emulations.  Expect
	MIPS emulations to be e-mipself*.
	* configure: Regenerate.
	* configure.tgt (mips-sony-bsd*, mips-*-ultrix*, mips-*-osf*)
	(mips-*-ecoff*, mips-*-pe*, mips-*-irix*, ips-*-lnews*, mips-*-riscos*)
	(mips-*-sysv*): Remove coff and ecoff cases.
	* as.c (mipsbecoff, mipslecoff, mipsecoff): Remove.
	* ecoff.c: Remove reference to MIPS ECOFF.
	* config/e-mipsecoff.c, config/te-lnews.h: Delete files.
	* config/tc-mips.c (ECOFF_LITTLE_FORMAT): Delete.
	(RDATA_SECTION_NAME, mips_target_form): Remove COFF and ECOFF cases.
	(mips_hi_fixup): Tweak comment.
	(append_insn): Require a howto.
	(mips_after_parse_args): Remove OBJ_MAYBE_ECOFF code.

gas/testsuite/
	* gas/all/gas.exp: Remove reference to mips-ecoff.
	* gas/mips/branch-misc-1.d, gas/mips/branch-misc-2.d,
	gas/mips/branch-misc-2-64.d, gas/mips/branch-misc-2pic.d,
	gas/mips/branch-misc-2pic-64.d, gas/mips/branch-swap.d: Remove
	skips for mips-*-ecoff.

ld/
	* NEWS: Document the removal of MIPS ECOFF targets.
	* ld.texinfo (--gpsize=@var{value}): Use MIPS ELF rather than
	MIPS ECOFF as an example of a target that supports small data.
	* ldmain.c (g_switch_value): Likewise.
	* configure.tgt (mips*-*-pe, mips*-dec-ultrix*, mips*-dec-osf*)
	(mips*-sgi-irix* [v4 and earlier], mips*el-*-ecoff*, mips*-*-ecoff*)
	(mips*-*-bsd*, mips*-*-lnews*): Remove cases.
	* Makefile.am (ALL_EMULATION_SOURCES): Remove emipsbig.c, emipsbsd.c,
	emipsidt.c, emipsidtl.c, emipslit.c, emipslnews.c and emipspe.c.
	(emipsbig.c, emipsbsd.c, emipsidt.c, emipsidtl.c, emipslit.c)
	(emipslnews.c, emipspe.c): Delete rules.
	* Makefile.in: Regenerate.
	* emulparams/mipsbig.sh, emulparams/mipsbsd.sh, emulparams/mipsidt.sh,
	emulparams/mipsidtl.sh, emulparams/mipslit.sh, emulparams/mipslnews.sh,
	emulparams/mipspe.sh, emultempl/mipsecoff.em: Delete.
	* emultempl/m68kcoff.em: Update comment to say that MIPS ECOFF support
	has now been removed.
	* emultempl/pe.em: Remove TARGET_IS_mipspe checks.

Index: configure.ac
===================================================================
--- configure.ac	2013-06-22 16:47:29.718554369 +0100
+++ configure.ac	2013-06-22 16:47:34.528593261 +0100
@@ -1101,10 +1101,14 @@ case "${target}" in
     noconfigdirs="$noconfigdirs gprof target-libgloss"
     ;;
   mips*-*-bsd*)
-    noconfigdirs="$noconfigdirs gprof target-libgloss"
+    noconfigdirs="$noconfigdirs ld gas gprof target-libgloss"
     ;;
   mips*-*-linux*)
     ;;
+  mips*-*-ultrix* | mips*-*-osf* | mips*-*-ecoff* | mips*-*-pe* \
+  | mips*-*-irix* | mips*-*-lnews* | mips*-*-riscos*)
+    noconfigdirs="$noconfigdirs ld gas gprof"
+    ;;
   mips*-*-*)
     noconfigdirs="$noconfigdirs gprof"
     ;;
Index: gas/NEWS
===================================================================
--- gas/NEWS	2013-06-22 16:47:29.718554369 +0100
+++ gas/NEWS	2013-06-22 16:47:34.533593302 +0100
@@ -11,6 +11,8 @@
 
 * Add support for the v850e3v5.
 
+* Remove assembler support for MIPS ECOFF targets.
+
 Changes in 2.23:
 
 * Add support for the 64-bit ARM architecture: AArch64.
Index: gas/doc/as.texinfo
===================================================================
--- gas/doc/as.texinfo	2013-06-22 16:47:33.975588789 +0100
+++ gas/doc/as.texinfo	2013-06-22 16:47:34.544593391 +0100
@@ -1357,28 +1357,16 @@ out-of-range branches to produce an erro
 
 @cindex emulation
 @item --emulation=@var{name}
-This option causes @command{@value{AS}} to emulate @command{@value{AS}} configured
-for some other target, in all respects, including output format (choosing
-between ELF and ECOFF only), handling of pseudo-opcodes which may generate
-debugging information or store symbol table information, and default
-endianness.  The available configuration names are: @samp{mipsecoff},
-@samp{mipself}, @samp{mipslecoff}, @samp{mipsbecoff}, @samp{mipslelf},
-@samp{mipsbelf}.  The first two do not alter the default endianness from that
-of the primary target for which the assembler was configured; the others change
-the default to little- or big-endian as indicated by the @samp{b} or @samp{l}
-in the name.  Using @samp{-EB} or @samp{-EL} will override the endianness
-selection in any case.
+This option was formerly used to switch between ELF and ECOFF output
+on targets like IRIX 5 that supported both.  MIPS ECOFF support was
+removed in GAS 2.24, so the option now serves little purpose.
+It is retained for backwards compatibility.
 
-This option is currently supported only when the primary target
-@command{@value{AS}} is configured for is a MIPS ELF or ECOFF target.
-Furthermore, the primary target or others specified with
-@samp{--enable-targets=@dots{}} at configuration time must include support for
-the other format, if both are to be available.  For example, the Irix 5
-configuration includes support for both.
-
-Eventually, this option will support more configurations, with more
-fine-grained control over the assembler's behavior, and will be supported for
-more processors.
+The available configuration names are: @samp{mipself}, @samp{mipslelf} and
+@samp{mipsbelf}.  Choosing @samp{mipself} now has no effect, since the output
+is always ELF.  @samp{mipslelf} and @samp{mipsbelf} select little- and
+big-endian output respectively, but @samp{-EL} and @samp{-EB} are now the
+preferred options instead.
 
 @item -nocpp
 @command{@value{AS}} ignores this option.  It is accepted for compatibility with
Index: gas/Makefile.am
===================================================================
--- gas/Makefile.am	2013-06-22 16:47:29.718554369 +0100
+++ gas/Makefile.am	2013-06-22 16:47:34.540593358 +0100
@@ -309,7 +309,6 @@ TARG_ENV_HFILES = \
 	config/te-i386aix.h \
 	config/te-ia64aix.h \
 	config/te-interix.h \
-	config/te-lnews.h \
 	config/te-lynx.h \
 	config/te-mach.h \
 	config/te-macos.h \
@@ -340,7 +339,6 @@ MULTI_CFILES = \
 	config/e-i386aout.c \
 	config/e-i386coff.c \
 	config/e-i386elf.c \
-	config/e-mipsecoff.c \
 	config/e-mipself.c
 
 CONFIG_ATOF_CFILES = \
Index: gas/configure.in
===================================================================
--- gas/configure.in	2013-06-22 16:47:29.718554369 +0100
+++ gas/configure.in	2013-06-22 16:47:34.536593326 +0100
@@ -164,12 +164,6 @@ for this_target in $target $canon_target
       microblaze*)
         ;;
 
-      mips-sony-bsd*)
-	;;
-      mips-*-bsd*)
-	AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.)
-	;;
-
 changequote(,)dnl
       ppc-*-aix[5-9].*)
 changequote([,])dnl
@@ -252,7 +246,6 @@ changequote([,])dnl
 	esac
 	# See whether it's appropriate to set E_MIPS_ABI_O32 for o32
 	# binaries.  It's a GNU extension that some OSes don't understand.
-	# The value only matters on ELF targets.
 	case ${target} in
 	  *-*-irix*)
 	    use_e_mips_abi_o32=0
@@ -430,22 +423,10 @@ changequote([,])dnl
 # From target name and format, produce a list of supported emulations.
 
     case ${generic_target}-${fmt} in
-      mips-*-irix5*-*)	emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
-      mips*-*-linux*-* | mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
-			case "$endian" in
-			big)	emulation="mipsbelf mipslelf mipself" ;;
-			*)	emulation="mipslelf mipsbelf mipself" ;;
-			esac ;;
-      mips-*-lnews*-ecoff) ;;
-      mips-*-*-ecoff)	case "$endian" in
-			big)	emulation="mipsbecoff mipslecoff mipsecoff" ;;
-			*)	emulation="mipslecoff mipsbecoff mipsecoff" ;;
-			esac ;;
-      mips-*-*-elf)	case "$endian" in
+      mips-*-*-*)	case "$endian" in
 			big)	emulation="mipsbelf mipslelf mipself" ;;
 			*)	emulation="mipslelf mipsbelf mipself" ;;
 			esac ;;
-      mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
       # i386-pc-pe-coff != i386-pc-coff.
       i386-*-pe-coff)	;;
       # Uncommenting the next line will turn on support for i386 AOUT
@@ -558,7 +539,7 @@ esac
 #
 # And then there's "--enable-targets=all"....
 #
-# For now, just always do it for MIPS ELF or ECOFF configurations.  Sigh.
+# For now, just always do it for MIPS ELF configurations.  Sigh.
 
 formats="${obj_format}"
 emfiles=""
@@ -569,8 +550,6 @@ for em in . $emulations ; do
     .)	continue ;;
     mipsbelf | mipslelf | mipself)
 	fmt=elf   file=mipself ;;
-    mipsbecoff | mipslecoff | mipsecoff)
-	fmt=ecoff file=mipsecoff ;;
     *coff)
 	fmt=coff  file=$em ;;
     *aout)
@@ -601,11 +580,11 @@ if test `set . $formats ; shift ; echo $
 fi
 if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then
   DEFAULT_EMULATION=`set . $emulations ; echo $2`
-  # e-mips* has more than one emulation per file, e-i386* has just one at the
+  # e-mipself has more than one emulation per file, e-i386* has just one at the
   # moment.  If only one emulation is specified, then don't define
   # USE_EMULATIONS or include any of the e-files as they will only be bloat.
   case "${obj_format}${emfiles}" in
-    multi* | *mips*)
+    multi* | *mipself*)
       extra_objects="$extra_objects $emfiles"
       AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;;
   esac
Index: gas/configure.tgt
===================================================================
--- gas/configure.tgt	2013-06-22 16:47:29.718554369 +0100
+++ gas/configure.tgt	2013-06-22 16:47:34.529593269 +0100
@@ -318,23 +318,13 @@ case ${generic_target} in
 
   microblaze-*-*)			fmt=elf ;;
 
-  # don't change em like *-*-bsd does
-  mips-sony-bsd*)			fmt=ecoff ;;
-  mips-*-ultrix*)			fmt=ecoff endian=little ;;
-  mips-*-osf*)				fmt=ecoff endian=little ;;
-  mips-*-ecoff*)			fmt=ecoff ;;
-  mips-*-pe*)				fmt=coff endian=little em=pe ;;
   mips-*-irix6*)			fmt=elf em=irix ;;
   mips-*-irix5*)			fmt=elf em=irix ;;
-  mips-*-irix*)				fmt=ecoff em=irix ;;
-  mips-*-lnews*)			fmt=ecoff em=lnews ;;
-  mips-*-riscos*)			fmt=ecoff ;;
   mips*-*-linux*)			fmt=elf em=tmips ;;
   mips*-*-freebsd* | mips*-*-kfreebsd*-gnu)
 					fmt=elf em=freebsd ;;
   mips-*-sysv4*MP* | mips-*-gnu*)	fmt=elf em=tmips ;;
   mips*-sde-elf* | mips*-mti-elf*)	fmt=elf em=tmips ;;
-  mips-*-sysv*)				fmt=ecoff ;;
   mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
   mips-*-netbsd*)			fmt=elf em=tmips ;;
   mips-*-openbsd*)			fmt=elf em=tmips ;;
Index: gas/as.c
===================================================================
--- gas/as.c	2013-06-22 16:47:29.718554369 +0100
+++ gas/as.c	2013-06-22 16:47:34.540593358 +0100
@@ -132,7 +132,6 @@ struct itbl_file_list
 #define EMULATION_ENVIRON "AS_EMULATION"
 
 extern struct emulation mipsbelf, mipslelf, mipself;
-extern struct emulation mipsbecoff, mipslecoff, mipsecoff;
 extern struct emulation i386coff, i386elf, i386aout;
 extern struct emulation crisaout, criself;
 
Index: gas/ecoff.c
===================================================================
--- gas/ecoff.c	2013-06-22 16:47:29.718554369 +0100
+++ gas/ecoff.c	2013-06-22 16:47:34.541593366 +0100
@@ -27,8 +27,7 @@
 #include "as.h"
 
 /* This file is compiled conditionally for those targets which use
-   ECOFF debugging information (e.g., MIPS ECOFF, MIPS ELF, Alpha
-   ECOFF).  */
+   ECOFF debugging information (e.g., MIPS ELF, Alpha ECOFF).  */
 
 #include "ecoff.h"
 
Index: gas/config/e-mipsecoff.c
===================================================================
--- gas/config/e-mipsecoff.c	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,56 +0,0 @@
-/* Copyright 2007 Free Software Foundation, Inc.
-
-   This file is part of GAS, the GNU Assembler.
-
-   GAS is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   GAS is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with GAS; see the file COPYING.  If not, write to the Free
-   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-   02110-1301, USA.  */
-
-#include "as.h"
-#include "emul.h"
-
-static const char *mipsecoff_bfd_name (void);
-
-static const char *
-mipsecoff_bfd_name (void)
-{
-  abort ();
-  return NULL;
-}
-
-#define emul_bfd_name	mipsecoff_bfd_name
-#define emul_format	&ecoff_format_ops
-
-#define emul_name	"mipsbecoff"
-#define emul_struct_name mipsbecoff
-#define emul_default_endian 1
-#include "emul-target.h"
-
-#undef  emul_name
-#undef  emul_struct_name
-#undef  emul_default_endian
-
-#define emul_name	"mipslecoff"
-#define emul_struct_name mipslecoff
-#define emul_default_endian 0
-#include "emul-target.h"
-
-#undef emul_name
-#undef emul_struct_name
-#undef emul_default_endian
-
-#define emul_name	"mipsecoff"
-#define emul_struct_name mipsecoff
-#define emul_default_endian 2
-#include "emul-target.h"
Index: gas/config/te-lnews.h
===================================================================
--- gas/config/te-lnews.h	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,24 +0,0 @@
-/* Copyright 2007 Free Software Foundation, Inc.
-
-   This file is part of GAS, the GNU Assembler.
-
-   GAS is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 3,
-   or (at your option) any later version.
-
-   GAS is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-   the GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with GAS; see the file COPYING.  If not, write to the Free
-   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
-   02110-1301, USA.  */
-
-/* te-lnews.h -- little-endian NEWS emulation.  */
-
-#define ECOFF_LITTLE_FORMAT "ecoff-biglittlemips"
-
-#include "obj-format.h"
Index: gas/config/tc-mips.c
===================================================================
--- gas/config/tc-mips.c	2013-06-22 16:47:29.718554369 +0100
+++ gas/config/tc-mips.c	2013-06-22 16:47:34.539593350 +0100
@@ -106,22 +106,10 @@ #define ILLEGAL_REG (32)
 
 #define AT  mips_opts.at
 
-/* Allow override of standard little-endian ECOFF format.  */
-
-#ifndef ECOFF_LITTLE_FORMAT
-#define ECOFF_LITTLE_FORMAT "ecoff-littlemips"
-#endif
-
 extern int target_big_endian;
 
 /* The name of the readonly data section.  */
-#define RDATA_SECTION_NAME (OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
-			    ? ".rdata" \
-			    : OUTPUT_FLAVOR == bfd_target_coff_flavour \
-			    ? ".rdata" \
-			    : OUTPUT_FLAVOR == bfd_target_elf_flavour \
-			    ? ".rodata" \
-			    : (abort (), ""))
+#define RDATA_SECTION_NAME ".rodata"
 
 /* Ways in which an instruction can be "appended" to the output.  */
 enum append_method {
@@ -718,12 +706,12 @@ #define NOP_INSN_SIZE (HAVE_CODE_COMPRES
 /* The number of instructions we've seen since prev_nop_frag.  */
 static int prev_nop_frag_since;
 
-/* For ECOFF and ELF, relocations against symbols are done in two
-   parts, with a HI relocation and a LO relocation.  Each relocation
-   has only 16 bits of space to store an addend.  This means that in
-   order for the linker to handle carries correctly, it must be able
-   to locate both the HI and the LO relocation.  This means that the
-   relocations must appear in order in the relocation table.
+/* Relocations against symbols are sometimes done in two parts, with a HI
+   relocation and a LO relocation.  Each relocation has only 16 bits of
+   space to store an addend.  This means that in order for the linker to
+   handle carries correctly, it must be able to locate both the HI and
+   the LO relocation.  This means that the relocations must appear in
+   order in the relocation table.
 
    In order to implement this, we keep track of each unmatched HI
    relocation.  We then sort them so that they immediately precede the
@@ -1860,10 +1848,6 @@ mips_target_format (void)
 {
   switch (OUTPUT_FLAVOR)
     {
-    case bfd_target_ecoff_flavour:
-      return target_big_endian ? "ecoff-bigmips" : ECOFF_LITTLE_FORMAT;
-    case bfd_target_coff_flavour:
-      return "pe-mips";
     case bfd_target_elf_flavour:
 #ifdef TE_VXWORKS
       if (!HAVE_64BIT_OBJECTS && !HAVE_NEWABI)
@@ -4854,16 +4838,8 @@ append_insn (struct mips_cl_insn *ip, ex
       /* In a compound relocation, it is the final (outermost)
 	 operator that determines the relocated field.  */
       howto = howto0 = bfd_reloc_type_lookup (stdoutput, final_type[i - 1]);
-
-      if (howto == NULL)
-	{
-	  /* To reproduce this failure try assembling gas/testsuites/
-	     gas/mips/mips16-intermix.s with a mips-ecoff targeted
-	     assembler.  */
-	  as_bad (_("Unsupported MIPS relocation number %d"),
-		  final_type[i - 1]);
-	  howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_16);
-	}
+      if (!howto)
+	abort ();
 
       if (i > 1)
 	howto0 = bfd_reloc_type_lookup (stdoutput, final_type[0]);
@@ -15629,14 +15605,7 @@ mips_after_parse_args (void)
   mips_check_isa_supports_ases ();
 
   if (mips_flag_mdebug < 0)
-    {
-#ifdef OBJ_MAYBE_ECOFF
-      if (OUTPUT_FLAVOR == bfd_target_ecoff_flavour)
-	mips_flag_mdebug = 1;
-      else
-#endif /* OBJ_MAYBE_ECOFF */
-	mips_flag_mdebug = 0;
-    }
+    mips_flag_mdebug = 0;
 }
 
 void
Index: gas/testsuite/gas/all/gas.exp
===================================================================
--- gas/testsuite/gas/all/gas.exp	2013-06-22 16:47:29.718554369 +0100
+++ gas/testsuite/gas/all/gas.exp	2013-06-22 16:47:34.540593358 +0100
@@ -106,7 +106,7 @@ case $target_triplet in {
     }
 }
 
-# aout relocs are often weird, so is mep and mips-ecoff. don't bother testing
+# aout relocs are often weird, so is mep. don't bother testing
 # som doesn't use a .text section
 # mmix doesn't like .L1:
 # ti addresses aren't octets.
@@ -117,7 +117,6 @@ if { ![is_aout_format] } {
 	}
 	{ hppa*-*-hpux* } { }
 	{ mep-*-* } { }
-	{ mips*-*-ecoff* } { }
 	{ mmix-*-* } { }
 	{ tic30*-*-* } { }
 	{ tic4x*-*-* } { }
Index: gas/testsuite/gas/mips/branch-misc-1.d
===================================================================
--- gas/testsuite/gas/mips/branch-misc-1.d	2013-06-22 16:47:29.718554369 +0100
+++ gas/testsuite/gas/mips/branch-misc-1.d	2013-06-22 16:47:34.539593350 +0100
@@ -1,4 +1,3 @@
-#skip: mips-*-ecoff
 #objdump: -dr --prefix-addresses --show-raw-insn
 #name: MIPS branch-misc-1
 #as: -32
Index: gas/testsuite/gas/mips/branch-misc-2.d
===================================================================
--- gas/testsuite/gas/mips/branch-misc-2.d	2013-06-22 16:47:29.718554369 +0100
+++ gas/testsuite/gas/mips/branch-misc-2.d	2013-06-22 16:47:34.539593350 +0100
@@ -1,4 +1,3 @@
-#skip: mips-*-ecoff
 #objdump: -dr --prefix-addresses --show-raw-insn
 #name: MIPS branch-misc-2
 #as: -32 -non_shared
Index: gas/testsuite/gas/mips/branch-misc-2-64.d
===================================================================
--- gas/testsuite/gas/mips/branch-misc-2-64.d	2013-06-22 16:47:29.718554369 +0100
+++ gas/testsuite/gas/mips/branch-misc-2-64.d	2013-06-22 16:47:34.539593350 +0100
@@ -1,4 +1,3 @@
-#skip: mips-*-ecoff
 #objdump: -dr --prefix-addresses --show-raw-insn
 #name: MIPS branch-misc-2-64
 #source: branch-misc-2.s
Index: gas/testsuite/gas/mips/branch-misc-2pic.d
===================================================================
--- gas/testsuite/gas/mips/branch-misc-2pic.d	2013-06-22 16:47:29.718554369 +0100
+++ gas/testsuite/gas/mips/branch-misc-2pic.d	2013-06-22 16:47:34.539593350 +0100
@@ -1,4 +1,3 @@
-#skip: mips-*-ecoff
 #objdump: -dr --prefix-addresses --show-raw-insn
 #name: MIPS branch-misc-2pic
 #source: branch-misc-2.s
Index: gas/testsuite/gas/mips/branch-misc-2pic-64.d
===================================================================
--- gas/testsuite/gas/mips/branch-misc-2pic-64.d	2013-06-22 16:47:29.718554369 +0100
+++ gas/testsuite/gas/mips/branch-misc-2pic-64.d	2013-06-22 16:47:34.539593350 +0100
@@ -1,4 +1,3 @@
-#skip: mips-*-ecoff
 #objdump: -dr --prefix-addresses --show-raw-insn
 #name: MIPS branch-misc-2pic-64
 #source: branch-misc-2.s
Index: gas/testsuite/gas/mips/branch-swap.d
===================================================================
--- gas/testsuite/gas/mips/branch-swap.d	2013-06-22 16:47:29.718554369 +0100
+++ gas/testsuite/gas/mips/branch-swap.d	2013-06-22 16:47:34.539593350 +0100
@@ -1,4 +1,3 @@
-#skip: mips-*-ecoff
 #as: -march=mips2 -32
 #objdump: -dr
 #name: MIPS branch-swap
Index: ld/NEWS
===================================================================
--- ld/NEWS	2013-06-22 16:47:29.718554369 +0100
+++ ld/NEWS	2013-06-22 16:47:34.534593310 +0100
@@ -10,6 +10,8 @@
 
 * --enable-new-dtags no longer generates old dtags in addition to new dtags.
 
+* Remove linker support for MIPS ECOFF targets.
+
 Changes in 2.23:
 
 * Enable compressed debug section feature for x86/x86_64 pe-coff.
Index: ld/ld.texinfo
===================================================================
--- ld/ld.texinfo	2013-06-22 16:47:29.718554369 +0100
+++ ld/ld.texinfo	2013-06-22 16:47:34.542593375 +0100
@@ -619,7 +619,7 @@ Ignored.  Provided for compatibility wit
 @itemx --gpsize=@var{value}
 Set the maximum size of objects to be optimized using the GP register to
 @var{size}.  This is only meaningful for object file formats such as
-MIPS ECOFF which supports putting large and small objects into different
+MIPS ELF that support putting large and small objects into different
 sections.  This is ignored for other object file formats.
 
 @cindex runtime library name
Index: ld/ldmain.c
===================================================================
--- ld/ldmain.c	2013-06-22 16:47:29.718554369 +0100
+++ ld/ldmain.c	2013-06-22 16:47:34.543593383 +0100
@@ -80,7 +80,7 @@ const char *output_filename = "a.out";
 char * ld_canon_sysroot;
 int ld_canon_sysroot_len;
 
-/* Set by -G argument, for MIPS ECOFF target.  */
+/* Set by -G argument, for targets like MIPS ELF.  */
 int g_switch_value = 8;
 
 /* Nonzero means print names of input files as processed.  */
Index: ld/configure.tgt
===================================================================
--- ld/configure.tgt	2013-06-22 16:47:29.718554369 +0100
+++ ld/configure.tgt	2013-06-22 16:47:34.529593269 +0100
@@ -434,24 +434,16 @@ microblazeel*)		targ_emul=elf32microblaz
 microblaze*)		targ_emul=elf32microblaze
 			targ_extra_emuls=elf32microblazeel
 			;;
-mips*-*-pe)		targ_emul=mipspe ;
-			targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-mips*-dec-ultrix*)	targ_emul=mipslit ;;
-mips*-dec-osf*)		targ_emul=mipslit ;;
 mips*-sgi-irix5*)	targ_emul=elf32bsmip ;;
 mips*-sgi-irix6*)	targ_emul=elf32bmipn32
 	                targ_extra_emuls="elf32bsmip elf64bmip"
 			targ_extra_libpath=$targ_extra_emuls ;;
-mips*-sgi-irix*)	targ_emul=mipsbig ;;
-mips*el-*-ecoff*)	targ_emul=mipsidtl ;;
-mips*-*-ecoff*)		targ_emul=mipsidt ;;
 mips*el-*-netbsd*)	targ_emul=elf32ltsmip
 			targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
 			;;
 mips*-*-netbsd*)	targ_emul=elf32btsmip
 			targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
   			;;
-mips*-*-bsd*)		targ_emul=mipsbig ;;
 mips*vr4300el-*-elf*)	targ_emul=elf32l4300 ;;
 mips*vr4300-*-elf*)	targ_emul=elf32b4300 ;;
 mips*vr4100el-*-elf*)	targ_emul=elf32l4300 ;;
@@ -505,7 +497,6 @@ mips*-*-freebsd* | mips*-*-kfreebsd*-gnu
 			targ_emul=elf32btsmip_fbsd
 			targ_extra_emuls="elf32ltsmip elf32btsmip elf32ltsmipn32 elf32btsmipn32 elf64ltsmip elf64btsmip elf32ltsmip_fbsd elf32btsmipn32_fbsd elf32ltsmipn32_fbsd elf64ltsmip_fbsd elf64btsmip_fbsd"
 			targ_extra_libpath=$targ_extra_emuls ;;
-mips*-*-lnews*)		targ_emul=mipslnews ;;
 mips*-*-sysv4*)         targ_emul=elf32btsmip
 			;;
 mmix-*-*)		targ_emul=mmo
Index: ld/Makefile.am
===================================================================
--- ld/Makefile.am	2013-06-22 16:47:29.718554369 +0100
+++ ld/Makefile.am	2013-06-22 16:47:34.531593286 +0100
@@ -356,13 +356,6 @@ ALL_EMULATION_SOURCES = \
 	em68kpsos.c \
 	em88kbcs.c \
 	emcorepe.c \
-	emipsbig.c \
-	emipsbsd.c \
-	emipsidt.c \
-	emipsidtl.c \
-	emipslit.c \
-	emipslnews.c \
-	emipspe.c \
 	emn10200.c \
 	emn10300.c \
 	emsp430x110.c \
@@ -1508,29 +1501,6 @@ em88kbcs.c: $(srcdir)/emulparams/m88kbcs
 emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
   $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
-emipsbig.c: $(srcdir)/emulparams/mipsbig.sh $(srcdir)/emultempl/generic.em \
-  $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} mipsbig "$(tdir_mipsbig)"
-emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh $(srcdir)/emultempl/generic.em \
-  $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} mipsbsd "$(tdir_mipsbsd)"
-emipsidt.c: $(srcdir)/emulparams/mipsidt.sh $(srcdir)/emultempl/generic.em \
-  $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
-  ${GEN_DEPENDS}
-	${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
-emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh $(srcdir)/emultempl/generic.em \
-  $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
-  ${GEN_DEPENDS}
-	${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
-emipslit.c: $(srcdir)/emulparams/mipslit.sh $(srcdir)/emultempl/generic.em \
-  $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} mipslit "$(tdir_mipslit)"
-emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
-  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} mipslnews "$(tdir_mipslnews)"
-emipspe.c: $(srcdir)/emulparams/mipspe.sh $(srcdir)/emultempl/pe.em \
-  $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
-	${GENSCRIPTS} mipspe "$(tdir_mipspe)"
 emn10200.c: $(srcdir)/emulparams/mn10200.sh \
   $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
Index: ld/emulparams/mipsbig.sh
===================================================================
--- ld/emulparams/mipsbig.sh	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,6 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-bigmips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
Index: ld/emulparams/mipsbsd.sh
===================================================================
--- ld/emulparams/mipsbsd.sh	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,7 +0,0 @@
-SCRIPT_NAME=mipsbsd
-OUTPUT_FORMAT="a.out-mips-little"
-BIG_OUTPUT_FORMAT="a.out-mips-big"
-LITTLE_OUTPUT_FORMAT="a.out-mips-little"
-TEXT_START_ADDR=0x1020
-TARGET_PAGE_SIZE=4096
-ARCH=mips
Index: ld/emulparams/mipsidt.sh
===================================================================
--- ld/emulparams/mipsidt.sh	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,12 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-bigmips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
-ENTRY=start
-TEXT_START_ADDR=0xa0012000
-DATA_ADDR=.
-TEMPLATE_NAME=generic
-EXTRA_EM_FILE=mipsecoff
-EMBEDDED=yes
Index: ld/emulparams/mipsidtl.sh
===================================================================
--- ld/emulparams/mipsidtl.sh	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,12 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-littlemips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
-ENTRY=start
-TEXT_START_ADDR=0xa0012000
-DATA_ADDR=.
-TEMPLATE_NAME=generic
-EXTRA_EM_FILE=mipsecoff
-EMBEDDED=yes
Index: ld/emulparams/mipslit.sh
===================================================================
--- ld/emulparams/mipslit.sh	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,6 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-littlemips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
Index: ld/emulparams/mipslnews.sh
===================================================================
--- ld/emulparams/mipslnews.sh	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,9 +0,0 @@
-SCRIPT_NAME=mips
-OUTPUT_FORMAT="ecoff-littlemips"
-BIG_OUTPUT_FORMAT="ecoff-bigmips"
-LITTLE_OUTPUT_FORMAT="ecoff-littlemips"
-TARGET_PAGE_SIZE=0x1000000
-ARCH=mips
-TEXT_START_ADDR=0x80080000
-DATA_ADDR=.
-EMBEDDED=yes
Index: ld/emulparams/mipspe.sh
===================================================================
--- ld/emulparams/mipspe.sh	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,9 +0,0 @@
-ARCH=mips
-SCRIPT_NAME=pe
-OUTPUT_FORMAT="pei-mips"
-OUTPUT_ARCH="mips"
-RELOCATEABLE_OUTPUT_FORMAT="ecoff-littlemips"
-TEMPLATE_NAME=pe
-SUBSYSTEM=PE_DEF_SUBSYSTEM
-INITIAL_SYMBOL_CHAR=\"_\"
-TARGET_PAGE_SIZE=0x1000
Index: ld/emultempl/mipsecoff.em
===================================================================
--- ld/emultempl/mipsecoff.em	2013-06-22 16:47:29.718554369 +0100
+++ /dev/null	2013-06-17 18:11:16.259026486 +0100
@@ -1,38 +0,0 @@
-# This shell script emits a C file. -*- C -*-
-#   Copyright 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
-#   Free Software Foundation, Inc.
-#
-# This file is part of the GNU Binutils.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-
-if [ -z "$MACHINE" ]; then
-  OUTPUT_ARCH=${ARCH}
-else
-  OUTPUT_ARCH=${ARCH}:${MACHINE}
-fi
-fragment <<EOF
-static void
-gld${EMULATION_NAME}_before_parse (void)
-{
-#ifndef TARGET_			/* I.e., if not generic.  */
-  ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
-#endif /* not TARGET_ */
-}
-EOF
-
-LDEMUL_BEFORE_PARSE=gld${EMULATION_NAME}_before_parse
Index: ld/emultempl/m68kcoff.em
===================================================================
--- ld/emultempl/m68kcoff.em	2013-06-22 16:47:29.718554369 +0100
+++ ld/emultempl/m68kcoff.em	2013-06-22 16:47:34.543593383 +0100
@@ -8,7 +8,7 @@ fragment <<EOF
    Free Software Foundation, Inc.
    Written by Michael Sokolov <msokolov@ivan.Harhan.ORG>, based on generic.em
    by Steve Chamberlain <steve@cygnus.com>, embedded relocs code based on
-   mipsecoff.em by Ian Lance Taylor <ian@cygnus.com>.
+   mipsecoff.em by Ian Lance Taylor <ian@cygnus.com> (now removed).
 
    This file is part of the GNU Binutils.
 
Index: ld/emultempl/pe.em
===================================================================
--- ld/emultempl/pe.em	2013-06-22 16:47:29.718554369 +0100
+++ ld/emultempl/pe.em	2013-06-22 16:47:34.532593293 +0100
@@ -92,7 +92,6 @@ fragment <<EOF
 
 #if defined(TARGET_IS_i386pe) \
     || defined(TARGET_IS_shpe) \
-    || defined(TARGET_IS_mipspe) \
     || defined(TARGET_IS_armpe) \
     || defined(TARGET_IS_arm_epoc_pe) \
     || defined(TARGET_IS_arm_wince_pe)
@@ -1759,9 +1758,6 @@ gld_${EMULATION_NAME}_recognized_file (l
 #ifdef TARGET_IS_shpe
   pe_dll_id_target ("pei-shl");
 #endif
-#ifdef TARGET_IS_mipspe
-  pe_dll_id_target ("pei-mips");
-#endif
 #ifdef TARGET_IS_armpe
   pe_dll_id_target ("pei-arm-little");
 #endif
@@ -1826,7 +1822,7 @@ gld_${EMULATION_NAME}_finish (void)
 
 #ifdef DLL_SUPPORT
   if (link_info.shared
-#if !defined(TARGET_IS_shpe) && !defined(TARGET_IS_mipspe)
+#if !defined(TARGET_IS_shpe)
       || (!link_info.relocatable && pe_def_file->num_exports != 0)
 #endif
     )
@@ -1835,7 +1831,7 @@ gld_${EMULATION_NAME}_finish (void)
       if (pe_implib_filename)
 	pe_dll_generate_implib (pe_def_file, pe_implib_filename, &link_info);
     }
-#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe)
+#if defined(TARGET_IS_shpe)
   /* ARM doesn't need relocs.  */
   else
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]