Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Patch: Switch Linux/mips to stabs
@ 2001-06-07 10:35 H . J . Lu
  2001-06-07 22:12 ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: H . J . Lu @ 2001-06-07 10:35 UTC (permalink / raw)
  To: binutils; +Cc: GDB, linux-mips

Based on the recommendations from Ian and Daniel, I checked in the
following patches to switch Linux/mips to stabs.

Thanks.

---
2001-06-07  H.J. Lu  <hjl@gnu.org>

	* elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
	for SGI only.

	* config.bfd: Remove ecoff from Linux/mips.

Index: config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.58
diff -u -p -r1.58 config.bfd
--- config.bfd	2001/06/02 17:32:09	1.58
+++ config.bfd	2001/06/07 17:28:52
@@ -675,7 +675,7 @@ case "${targ}" in
     ;;
   mips*el*-*-linux-gnu*)
     targ_defvec=bfd_elf32_tradlittlemips_vec
-    targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
+    targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
     ;;
   mips*-*-openbsd*)
     targ_defvec=bfd_elf32_bigmips_vec
@@ -683,7 +683,7 @@ case "${targ}" in
     ;;
   mips*-*-linux-gnu*)
     targ_defvec=bfd_elf32_tradbigmips_vec
-    targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
+    targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
     ;;
   mn10200-*-*)
     targ_defvec=bfd_elf32_mn10200_vec
Index: elf32-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mips.c,v
retrieving revision 1.97
diff -u -p -r1.97 elf32-mips.c
--- elf32-mips.c	2001/05/23 17:26:35	1.97
+++ elf32-mips.c	2001/06/07 17:29:12
@@ -2331,7 +2331,8 @@ _bfd_mips_elf_object_p (abfd)
   /* Irix 5 and 6 is broken.  Object file symbol tables are not always
      sorted correctly such that local symbols precede global symbols,
      and the sh_info field in the symbol table is not always right.  */
-  elf_bad_symtab (abfd) = true;
+  if (SGI_COMPAT(abfd))
+    elf_bad_symtab (abfd) = true;
 
   bfd_default_set_arch_mach (abfd, bfd_arch_mips,
 			     elf_mips_mach (elf_elfheader (abfd)->e_flags));

2001-06-07  H.J. Lu  <hjl@gnu.org>

	* configure.in: Use MIPS_STABS_ELF for Linux/mips and remove
	ecoff emulation.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.69
diff -u -p -r1.69 configure.in
--- configure.in	2001/05/25 07:21:00	1.69
+++ configure.in	2001/06/07 17:20:54
@@ -346,8 +346,13 @@ changequote([,])dnl
       mips-*-irix*)         fmt=ecoff ;;
       mips-*-lnews*)        fmt=ecoff em=lnews ;;
       mips-*-riscos*)       fmt=ecoff ;;
-      mips-*-sysv4*MP* | mips-*-linux-gnu* | mips-*-gnu*)
+      mips-*-sysv4*MP* | mips-*-gnu*)
 			    fmt=elf em=tmips ;;
+      mips-*-linux-gnu*)
+			    fmt=elf em=tmips
+			    AC_DEFINE(MIPS_STABS_ELF, 1,
+				[Use ELF stabs for MIPS, not ECOFF stabs])
+			    ;;
       mips-*-sysv*)         fmt=ecoff ;;
       mips-*-elf* | mips-*-rtems* | mips-*-openbsd*)
 			    fmt=elf ;;
@@ -602,8 +607,8 @@ changequote([,])dnl
     case ${generic_target}-${fmt} in
       mips-*-irix5*-*)	emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
       mips-*-linux-gnu*-*) case "$endian" in
-			big)	emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;;
-			*)	emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;;
+			big)	emulation="mipsbelf mipslelf mipself" ;;
+			*)	emulation="mipslelf mipsbelf mipself" ;;
 			esac ;;
       mips-*-lnews*-ecoff) ;;
       mips-*-*-ecoff)	case "$endian" in


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch: Switch Linux/mips to stabs
  2001-06-07 10:35 Patch: Switch Linux/mips to stabs H . J . Lu
@ 2001-06-07 22:12 ` Maciej W. Rozycki
  2001-06-07 23:23   ` H . J . Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2001-06-07 22:12 UTC (permalink / raw)
  To: H . J . Lu; +Cc: binutils, GDB, linux-mips

On Thu, 7 Jun 2001, H . J . Lu wrote:

> 	* config.bfd: Remove ecoff from Linux/mips.

 Is it really needed to remove ecoff-littlemips and ecoff-bigmips targets
from the list of default ones for MIPS/Linux?  COFF is the format used by
the firmware of certain MIPS-based machines for network-booting, certainly
by DECstations and I'm told that older SGI workstations use this format,
too.  While the elf2ecoff tool as bundled with the kernel seem to be
sufficient to prepare a suitable COFF image, it's grossly limited in
functionality and was added only as a workaround to bugs in binutils.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Patch: Switch Linux/mips to stabs
  2001-06-07 22:12 ` Maciej W. Rozycki
@ 2001-06-07 23:23   ` H . J . Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H . J . Lu @ 2001-06-07 23:23 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: binutils, GDB, linux-mips

On Fri, Jun 08, 2001 at 07:12:39AM +0200, Maciej W. Rozycki wrote:
> On Thu, 7 Jun 2001, H . J . Lu wrote:
> 
> > 	* config.bfd: Remove ecoff from Linux/mips.
> 
>  Is it really needed to remove ecoff-littlemips and ecoff-bigmips targets
> from the list of default ones for MIPS/Linux?  COFF is the format used by
> the firmware of certain MIPS-based machines for network-booting, certainly
> by DECstations and I'm told that older SGI workstations use this format,
> too.  While the elf2ecoff tool as bundled with the kernel seem to be
> sufficient to prepare a suitable COFF image, it's grossly limited in
> functionality and was added only as a workaround to bugs in binutils.
> 

Sorry. I put it back.


H.J.
----
2001-06-07  H.J. Lu  <hjl@gnu.org>

	* config.bfd: Put back ecoff for Linux/mips. Firmwares on some
	MIPS-based machines need it.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-07 23:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-07 10:35 Patch: Switch Linux/mips to stabs H . J . Lu
2001-06-07 22:12 ` Maciej W. Rozycki
2001-06-07 23:23   ` H . J . Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox