This is the mail archive of the binutils@sources.redhat.com 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]

[patch] MIPS Linux symbol sorting


Please find attached the patch that fixes the sorting of symbols for
Linux MIPS targets. Before this patch, GAS was sorting global and local
symbols based on IRIX type targets which has the side effect of building
binaries that may not have their symbols sorted properly and was also
preventing the ability of creating Linux MIPS kernel modules which when
inserted produced error messages like: 

dummy.o: local symbol gcc2_compiled. with index 10 exceeds local_symtab_size 10
dummy.o: local symbol __gnu_compiled_c with index 11 exceeds local_symtab_size
10
dummy.o: local symbol __module_kernel_version with index 12 exceeds
local_symtab_size 10

This has been tested on elf32 little endian targets. I was able to
compile a full toolchain for elf32 little and big endian targets so I
am confident that those targets will work for Linux. I have NOT tested
the 64 bit targets and would appreciate testing from others. Thanks.

-Steve

diff -urN --exclude=CVS binutils-04032001/bfd/config.bfd binutils-04032001-patched/bfd/config.bfd
--- binutils-04032001/bfd/config.bfd	Thu Mar 29 21:41:39 2001
+++ binutils-04032001-patched/bfd/config.bfd	Wed Apr  4 07:24:03 2001
@@ -663,15 +663,22 @@
     targ_defvec=bfd_elf32_bigmips_vec
     targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
     ;;
-  mips*el*-*-linux-gnu* | mips*el*-*-openbsd*)
+  mips*el*-*-openbsd*)
     targ_defvec=bfd_elf32_littlemips_vec
     targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
     ;;
-  mips*-*-linux-gnu* | mips*-*-openbsd*)
+  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"
+    ;;
+  mips*-*-openbsd*)
     targ_defvec=bfd_elf32_bigmips_vec
     targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
     ;;
-
+  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"
+    ;;
   mn10200-*-*)
     targ_defvec=bfd_elf32_mn10200_vec
     ;;
diff -urN --exclude=CVS binutils-04032001/bfd/configure binutils-04032001-patched/bfd/configure
--- binutils-04032001/bfd/configure	Sat Mar 24 01:17:01 2001
+++ binutils-04032001-patched/bfd/configure	Wed Apr  4 08:49:27 2001
@@ -6003,6 +6003,10 @@
 				target64=true ;;
     bfd_elf64_sparc_vec)	tb="$tb elf64-sparc.lo elf64.lo $elf"
 				target64=true ;;
+    bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+				target64=true ;;
+    bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+				target64=true ;;
     cisco_core_big_vec)		tb="$tb cisco-core.lo" ;;
     cisco_core_little_vec)	tb="$tb cisco-core.lo" ;;
     cris_aout_vec)		tb="$tb aout-cris.lo" ;;
diff -urN --exclude=CVS binutils-04032001/bfd/configure.in binutils-04032001-patched/bfd/configure.in
--- binutils-04032001/bfd/configure.in	Sat Mar 24 01:17:01 2001
+++ binutils-04032001-patched/bfd/configure.in	Wed Apr  4 08:51:10 2001
@@ -561,6 +561,10 @@
 				target64=true ;;
     bfd_elf64_sparc_vec)	tb="$tb elf64-sparc.lo elf64.lo $elf"
 				target64=true ;;
+    bfd_elf64_tradbigmips_vec)	tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+				target64=true ;;
+    bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
+				target64=true ;;
     cisco_core_big_vec)		tb="$tb cisco-core.lo" ;;
     cisco_core_little_vec)	tb="$tb cisco-core.lo" ;;
     cris_aout_vec)		tb="$tb aout-cris.lo" ;;
diff -urN --exclude=CVS binutils-04032001/bfd/elf32-mips.c binutils-04032001-patched/bfd/elf32-mips.c
--- binutils-04032001/bfd/elf32-mips.c	Thu Mar 29 21:41:42 2001
+++ binutils-04032001-patched/bfd/elf32-mips.c	Wed Apr  4 13:16:10 2001
@@ -208,6 +208,9 @@
   PARAMS ((const void *, const void *));
 
 extern const bfd_target bfd_elf32_tradbigmips_vec;
+extern const bfd_target bfd_elf32_tradlittlemips_vec;
+extern const bfd_target bfd_elf64_tradbigmips_vec;
+extern const bfd_target bfd_elf64_tradlittlemips_vec;
 
 /* The level of IRIX compatibility we're striving for.  */
 
@@ -225,8 +228,7 @@
 #define ABI_N32_P(abfd) \
   ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI2) != 0)
 
-/* Nonzero if ABFD is using the 64-bit ABI.  FIXME: This is never
-   true, yet.  */
+/* Nonzero if ABFD is using the 64-bit ABI. */
 #define ABI_64_P(abfd) \
   ((elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64) != 0)
 
@@ -234,7 +236,10 @@
    executables or "normal" MIPS ELF ABI executables.  */
 
 #define IRIX_COMPAT(abfd) \
-  (abfd->xvec == &bfd_elf32_tradbigmips_vec ? ict_none : \
+  (((abfd->xvec == &bfd_elf64_tradbigmips_vec) || \
+    (abfd->xvec == &bfd_elf64_tradlittlemips_vec) || \
+    (abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
+    (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
   ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
 
 /* Whether we are trying to be compatible with IRIX at all.  */
@@ -2301,7 +2306,12 @@
      bfd *abfd ATTRIBUTE_UNUSED;
      asymbol *sym;
 {
-  return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false;
+  if (SGI_COMPAT(abfd))
+    return (sym->flags & BSF_SECTION_SYM) == 0 ? true : false;
+  else
+    return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
+            || bfd_is_und_section (bfd_get_section (sym))
+            || bfd_is_com_section (bfd_get_section (sym)));
 }
 
 /* Set the right machine number for a MIPS ELF file.  This is used for
diff -urN --exclude=CVS binutils-04032001/bfd/elf64-mips.c binutils-04032001-patched/bfd/elf64-mips.c
--- binutils-04032001/bfd/elf64-mips.c	Thu Mar  8 15:04:00 2001
+++ binutils-04032001-patched/bfd/elf64-mips.c	Wed Apr  4 13:19:54 2001
@@ -2188,4 +2189,21 @@
 #define bfd_elf64_archive_update_armap_timestamp \
 				_bfd_archive_coff_update_armap_timestamp
 
+#include "elf64-target.h"
+
+/* Support for traditional mips targets */
+
+#define INCLUDED_TARGET_FILE            /* More a type of flag */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define TARGET_LITTLE_SYM               bfd_elf64_tradlittlemips_vec
+#define TARGET_LITTLE_NAME              "elf64-tradlittlemips"
+#define TARGET_BIG_SYM                  bfd_elf64_tradbigmips_vec
+#define TARGET_BIG_NAME                 "elf64-tradbigmips"
+
+/* Include the target file again for this target */
 #include "elf64-target.h"
diff -urN --exclude=CVS binutils-04032001/bfd/targets.c binutils-04032001-patched/bfd/targets.c
--- binutils-04032001/bfd/targets.c	Thu Mar  8 15:04:02 2001
+++ binutils-04032001-patched/bfd/targets.c	Wed Apr  4 08:40:36 2001
@@ -564,6 +564,8 @@
 extern const bfd_target bfd_elf64_ia64_little_vec;
 extern const bfd_target bfd_elf64_little_generic_vec;
 extern const bfd_target bfd_elf64_littlemips_vec;
+extern const bfd_target bfd_elf64_tradbigmips_vec;
+extern const bfd_target bfd_elf64_tradlittlemips_vec;
 extern const bfd_target bfd_elf64_s390_vec;
 extern const bfd_target bfd_elf64_sparc_vec;
 extern const bfd_target bfd_elf64_x86_64_vec;
@@ -781,7 +783,10 @@
 	&bfd_elf32_mcore_little_vec,
 	&bfd_elf32_tradbigmips_vec,
 	&bfd_elf32_tradlittlemips_vec,
-#ifdef BFD64			/* No one seems to use this.  */
+#ifdef BFD64
+	&bfd_elf64_tradbigmips_vec,
+	&bfd_elf64_tradlittlemips_vec,
+	/* No one seems to use this.  */
 	&bfd_elf64_big_generic_vec,
 	&bfd_elf64_little_generic_vec,
 #endif
diff -urN --exclude=CVS binutils-04032001/gas/Makefile.am binutils-04032001-patched/gas/Makefile.am
--- binutils-04032001/gas/Makefile.am	Tue Feb 27 00:43:53 2001
+++ binutils-04032001-patched/gas/Makefile.am	Wed Apr  4 07:20:37 2001
@@ -361,7 +361,8 @@
 	config/te-sparcaout.h \
 	config/te-sun3.h \
 	config/te-svr4.h \
-	config/te-sysv32.h
+	config/te-sysv32.h \
+	config/te-tmips.h
 
 # Multi files in config
 
diff -urN --exclude=CVS binutils-04032001/gas/Makefile.in binutils-04032001-patched/gas/Makefile.in
--- binutils-04032001/gas/Makefile.in	Tue Feb 27 00:43:54 2001
+++ binutils-04032001-patched/gas/Makefile.in	Wed Apr  4 07:20:37 2001
@@ -482,7 +482,8 @@
 	config/te-sparcaout.h \
 	config/te-sun3.h \
 	config/te-svr4.h \
-	config/te-sysv32.h
+	config/te-sysv32.h \
+	config/te-tmips.h
 
 
 # Multi files in config
diff -urN --exclude=CVS binutils-04032001/gas/config/tc-mips.c binutils-04032001-patched/gas/config/tc-mips.c
--- binutils-04032001/gas/config/tc-mips.c	Fri Mar 30 01:17:04 2001
+++ binutils-04032001-patched/gas/config/tc-mips.c	Wed Apr  4 07:31:44 2001
@@ -126,7 +126,8 @@
 #ifdef TE_TMIPS
       /* This is traditional mips */
       return (target_big_endian
-	      ? "elf32-tradbigmips" : "elf32-tradlittlemips");
+	      ? (mips_64 ? "elf64-tradbigmips" : "elf32-tradbigmips")
+	      : (mips_64 ? "elf64-tradlittlemips" : "elf32-tradlittlemips"));
 #else
       return (target_big_endian
 	      ? (mips_64 ? "elf64-bigmips" : "elf32-bigmips")
diff -urN --exclude=CVS binutils-04032001/gas/configure binutils-04032001-patched/gas/configure
--- binutils-04032001/gas/configure	Tue Mar 27 01:16:53 2001
+++ binutils-04032001-patched/gas/configure	Wed Apr  4 07:34:37 2001
@@ -2496,9 +2496,10 @@
       mips-*-irix*)         fmt=ecoff ;;
       mips-*-lnews*)        fmt=ecoff em=lnews ;;
       mips-*-riscos*)       fmt=ecoff ;;
-      mips-*-sysv4*MP*)     fmt=elf em=tmips ;;
+      mips-*-sysv4*MP* | mips-*-linux-gnu* | mips-*-gnu*)
+			    fmt=elf em=tmips ;;
       mips-*-sysv*)         fmt=ecoff ;;
-      mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
+      mips-*-elf* | mips-*-rtems* | mips-*-openbsd*)
 			    fmt=elf ;;
       mips-*-vxworks*)      fmt=elf
 			    cat >> confdefs.h <<\EOF
diff -urN --exclude=CVS binutils-04032001/gas/configure.in binutils-04032001-patched/gas/configure.in
--- binutils-04032001/gas/configure.in	Tue Mar 27 01:16:53 2001
+++ binutils-04032001-patched/gas/configure.in	Wed Apr  4 07:35:18 2001
@@ -344,9 +344,10 @@
       mips-*-irix*)         fmt=ecoff ;;
       mips-*-lnews*)        fmt=ecoff em=lnews ;;
       mips-*-riscos*)       fmt=ecoff ;;
-      mips-*-sysv4*MP*)     fmt=elf em=tmips ;;
+      mips-*-sysv4*MP* | mips-*-linux-gnu* | mips-*-gnu*)
+			    fmt=elf em=tmips ;;
       mips-*-sysv*)         fmt=ecoff ;;
-      mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*)
+      mips-*-elf* | mips-*-rtems* | mips-*-openbsd*)
 			    fmt=elf ;;
       mips-*-vxworks*)      fmt=elf
 			    AC_DEFINE(MIPS_STABS_ELF, 1,
diff -urN --exclude=CVS binutils-04032001/ld/Makefile.am binutils-04032001-patched/ld/Makefile.am
--- binutils-04032001/ld/Makefile.am	Mon Mar 26 01:16:53 2001
+++ binutils-04032001-patched/ld/Makefile.am	Wed Apr  4 08:33:11 2001
@@ -145,6 +145,7 @@
 	eelf32bmip.o \
 	eelf32bmipn32.o \
 	eelf32btsmip.o \
+	eelf32ltsmip.o \
 	eelf32ebmip.o \
 	eelf32elmip.o \
 	eelf32fr30.o \
@@ -256,6 +257,8 @@
 	eelf64_sparc.o \
 	eelf64alpha.o \
 	eelf64bmip.o \
+	eelf64btsmip.o \
+	eelf64ltsmip.o \
 	eelf64hppa.o
 
 ALL_EMUL_EXTRA_OFILES = \
@@ -452,6 +455,9 @@
 eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
 eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
@@ -509,6 +515,12 @@
 eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
+eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
+eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
diff -urN --exclude=CVS binutils-04032001/ld/Makefile.in binutils-04032001-patched/ld/Makefile.in
--- binutils-04032001/ld/Makefile.in	Mon Mar 26 01:16:53 2001
+++ binutils-04032001-patched/ld/Makefile.in	Wed Apr  4 08:31:51 2001
@@ -183,10 +183,10 @@
 BFDLIB = ../bfd/libbfd.la
 LIBIBERTY = ../libiberty/libiberty.a
 
-ALL_EMULATIONS =  	ea29k.o 	eaixppc.o 	eaixrs6.o 	ealpha.o 	earcelf.o 	earm_epoc_pe.o 	earmaoutb.o 	earmaoutl.o 	earmcoff.o 	earmelf.o 	earmelf_linux.o 	earmelf_oabi.o 	earmnbsd.o 	earmpe.o 	eavr1200.o 	eavr23xx.o 	eavr4433.o 	eavr44x4.o 	eavr85xx.o 	eavrmega103.o 	eavrmega161.o 	eavrmega603.o 	ecoff_sparc.o 	ecrisaout.o 	ecriself.o 	ecrislinux.o 	ed10velf.o 	ed30v_e.o 	ed30v_o.o 	ed30velf.o 	edelta68.o 	eebmon29k.o 	eelf32_i960.o 	eelf32_i860.o 	eelf32_sparc.o 	eelf32b4300.o 	eelf32bmip.o 	eelf32bmipn32.o 	eelf32btsmip.o 	eelf32ebmip.o 	eelf32elmip.o 	eelf32fr30.o 	eelf32i370.o 	eelf32l4300.o 	eelf32lmip.o 	eelf32lppc.o 	eelf32lppcsim.o 	eelf32mcore.o 	eelf32ppc.o 	eelf32ppclinux.o 	eelf32ppcsim.o 	eelf_i386.o 	eelf_i386_be.o 	eelf_i386_chaos.o 	eelf_s390.o 	egld960.o 	egld960coff.o 	eh8300.o 	eh8300h.o 	eh8300s.o 	eh8500.o 	eh8500b.o 	eh8500c.o 	eh8500m.o 	eh8500s.o 	ehp300bsd.o 	ehp3hpux.o 	ehppaelf.o 	ehppalinux.o 	ei386aout.o 	ei386beos.o 	ei386bsd.o 	ei386coff.o 	ei386g!
o32.o 	ei386linux.o 	ei386lynx.o 	ei386mach.o 	ei386moss.o 	ei386msdos.o 	ei386nbsd.o 	ei386nw.o 	ei386pe.o 	ei386pe_posix.o 	elnk960.o 	em68hc11elf.o 	em68hc11elfb.o 	em68hc12elf.o 	em68hc12elfb.o 	em68k4knbsd.o 	em68kaout.o 	em68kaux.o 	em68kcoff.o 	em68kelf.o 	em68klinux.o 	em68klynx.o 	em68knbsd.o 	em68kpsos.o 	em88kbcs.o 	emcorepe.o 	emipsbig.o 	emipsbsd.o 	emipsidt.o 	emipsidtl.o 	emipslit.o 	emipslnews.o 	emipspe.o 	enews.o 	ens32knbsd.o 	epc532macha.o 	epdp11.o 	epjelf.o 	epjlelf.o 	eppcmacos.o 	eppcnw.o 	eppcpe.o 	eriscix.o 	esa29200.o 	esh.o 	eshelf.o 	eshelf_linux.o 	eshlelf_linux.o 	eshl.o 	eshlelf.o 	eshpe.o 	esparcaout.o 	esparclinux.o 	esparclynx.o 	esparcnbsd.o 	est2000.o 	esun3.o 	esun4.o 	etic30aout.o 	etic30coff.o 	etic54xcoff.o 	etic80coff.o 	evanilla.o 	evax.o 	evsta.o 	ew65.o 	ez8001.o 	ez8002.o
+ALL_EMULATIONS =  	ea29k.o 	eaixppc.o 	eaixrs6.o 	ealpha.o 	earcelf.o 	earm_epoc_pe.o 	earmaoutb.o 	earmaoutl.o 	earmcoff.o 	earmelf.o 	earmelf_linux.o 	earmelf_oabi.o 	earmnbsd.o 	earmpe.o 	eavr1200.o 	eavr23xx.o 	eavr4433.o 	eavr44x4.o 	eavr85xx.o 	eavrmega103.o 	eavrmega161.o 	eavrmega603.o 	ecoff_sparc.o 	ecrisaout.o 	ecriself.o 	ecrislinux.o 	ed10velf.o 	ed30v_e.o 	ed30v_o.o 	ed30velf.o 	edelta68.o 	eebmon29k.o 	eelf32_i960.o 	eelf32_i860.o 	eelf32_sparc.o 	eelf32b4300.o 	eelf32bmip.o 	eelf32bmipn32.o 	eelf32btsmip.o 	eelf32ltsmip.o  eelf32ebmip.o 	eelf32elmip.o 	eelf32fr30.o 	eelf32i370.o 	eelf32l4300.o 	eelf32lmip.o 	eelf32lppc.o 	eelf32lppcsim.o 	eelf32mcore.o 	eelf32ppc.o 	eelf32ppclinux.o 	eelf32ppcsim.o 	eelf_i386.o 	eelf_i386_be.o 	eelf_i386_chaos.o 	eelf_s390.o 	egld960.o 	egld960coff.o 	eh8300.o 	eh8300h.o 	eh8300s.o 	eh8500.o 	eh8500b.o 	eh8500c.o 	eh8500m.o 	eh8500s.o 	ehp300bsd.o 	ehp3hpux.o 	ehppaelf.o 	ehppalinux.o 	ei386aout.o 	ei386beos.o 	ei386bsd.o 	ei3!
86coff.o 	ei386go32.o 	ei386linux.o 	ei386lynx.o 	ei386mach.o 	ei386moss.o 	ei386msdos.o 	ei386nbsd.o 	ei386nw.o 	ei386pe.o 	ei386pe_posix.o 	elnk960.o 	em68hc11elf.o 	em68hc11elfb.o 	em68hc12elf.o 	em68hc12elfb.o 	em68k4knbsd.o 	em68kaout.o 	em68kaux.o 	em68kcoff.o 	em68kelf.o 	em68klinux.o 	em68klynx.o 	em68knbsd.o 	em68kpsos.o 	em88kbcs.o 	emcorepe.o 	emipsbig.o 	emipsbsd.o 	emipsidt.o 	emipsidtl.o 	emipslit.o 	emipslnews.o 	emipspe.o 	enews.o 	ens32knbsd.o 	epc532macha.o 	epdp11.o 	epjelf.o 	epjlelf.o 	eppcmacos.o 	eppcnw.o 	eppcpe.o 	eriscix.o 	esa29200.o 	esh.o 	eshelf.o 	eshelf_linux.o 	eshlelf_linux.o 	eshl.o 	eshlelf.o 	eshpe.o 	esparcaout.o 	esparclinux.o 	esparclynx.o 	esparcnbsd.o 	est2000.o 	esun3.o 	esun4.o 	etic30aout.o 	etic30coff.o 	etic54xcoff.o 	etic80coff.o 	evanilla.o 	evax.o 	evsta.o 	ew65.o 	ez8001.o 	ez8002.o
 
 
-ALL_64_EMULATIONS =  	eelf64_aix.o 	eelf64_ia64.o 	eelf_x86_64.o 	eelf64_s390.o 	eelf64_sparc.o 	eelf64alpha.o 	eelf64bmip.o 	eelf64hppa.o
+ALL_64_EMULATIONS =  	eelf64_aix.o 	eelf64_ia64.o 	eelf_x86_64.o 	eelf64_s390.o 	eelf64_sparc.o 	eelf64alpha.o 	eelf64bmip.o 	eelf64btsmip.o	eelf64ltsmip.o	eelf64hppa.o
 
 
 ALL_EMUL_EXTRA_OFILES =  	deffilep.o 	pe-dll.o
@@ -977,6 +977,9 @@
 eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
+eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
 eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
@@ -1034,6 +1037,12 @@
 eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
+eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
+eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
diff -urN --exclude=CVS binutils-04032001/ld/configure.tgt binutils-04032001-patched/ld/configure.tgt
--- binutils-04032001/ld/configure.tgt	Tue Mar 27 01:16:54 2001
+++ binutils-04032001-patched/ld/configure.tgt	Wed Apr  4 12:55:01 2001
@@ -276,11 +276,11 @@
 mips*-*-rtems*)		targ_emul=elf32ebmip ;;
 mips*el-*-vxworks*)	targ_emul=elf32elmip ;;
 mips*-*-vxworks*)	targ_emul=elf32ebmip ;;
-mips*el-*-linux-gnu*)	targ_emul=elf32lsmip
-			targ_extra_emuls="elf32bsmip mipslit mipsbig"
+mips*el-*-linux-gnu*)	targ_emul=elf32ltsmip
+			targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
 			;;
-mips*-*-linux-gnu*)	targ_emul=elf32bsmip
-			targ_extra_emuls="elf32lsmip mipsbig mipslit"
+mips*-*-linux-gnu*)	targ_emul=elf32btsmip
+			targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
 			;;
 mips*-*-lnews*)		targ_emul=mipslnews ;;
 mips*-*-sysv4*)         targ_emul=elf32btsmip ;;
diff -urN --exclude=CVS binutils-04032001/ld/emulparams/elf32ltsmip.sh binutils-04032001-patched/ld/emulparams/elf32ltsmip.sh
--- binutils-04032001/ld/emulparams/elf32ltsmip.sh	Wed Dec 31 18:00:00 1969
+++ binutils-04032001-patched/ld/emulparams/elf32ltsmip.sh	Wed Apr  4 07:20:37 2001
@@ -0,0 +1,31 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-tradlittlemips"
+BIG_OUTPUT_FORMAT="elf32-tradbigmips"
+LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
+TEXT_START_ADDR=0x0400000
+DATA_ADDR=0x10000000
+MAXPAGESIZE=0x40000
+NONPAGED_TEXT_START_ADDR=0x0400000
+SHLIB_TEXT_START_ADDR=0x0
+TEXT_DYNAMIC=
+INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+OTHER_GOT_SYMBOLS='
+  _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+  .lit8 : { *(.lit8) }
+  .lit4 : { *(.lit4) }
+'
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+OTHER_SECTIONS='
+  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+'
+ARCH=mips
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+ENTRY=__start
diff -urN --exclude=CVS binutils-04032001/ld/emulparams/elf64btsmip.sh binutils-04032001-patched/ld/emulparams/elf64btsmip.sh
--- binutils-04032001/ld/emulparams/elf64btsmip.sh	Wed Dec 31 18:00:00 1969
+++ binutils-04032001-patched/ld/emulparams/elf64btsmip.sh	Wed Apr  4 08:26:12 2001
@@ -0,0 +1,44 @@
+# This is an ELF platform.
+SCRIPT_NAME=elf
+
+# Handle both big- and little-ended 64-bit MIPS objects.
+ARCH=mips
+OUTPUT_FORMAT="elf64-tradbigmips"
+BIG_OUTPUT_FORMAT="elf64-tradbigmips"
+LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
+
+# Note that the elf32 template is used for 64-bit emulations as well 
+# as 32-bit emulations.
+ELFSIZE=64
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+
+TEXT_START_ADDR=0x10000000
+DATA_ADDR=0x0400000000
+MAXPAGESIZE=0x100000
+NONPAGED_TEXT_START_ADDR=0x10000000
+SHLIB_TEXT_START_ADDR=0x0
+TEXT_DYNAMIC=
+ENTRY=__start
+
+# GOT-related settings.  
+OTHER_GOT_SYMBOLS='
+  _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+  .lit8 : { *(.lit8) }
+  .lit4 : { *(.lit4) }
+'
+
+# Magic symbols.
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+
+# Magic sections.
+INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+OTHER_SECTIONS='
+  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+'
diff -urN --exclude=CVS binutils-04032001/ld/emulparams/elf64ltsmip.sh binutils-04032001-patched/ld/emulparams/elf64ltsmip.sh
--- binutils-04032001/ld/emulparams/elf64ltsmip.sh	Wed Dec 31 18:00:00 1969
+++ binutils-04032001-patched/ld/emulparams/elf64ltsmip.sh	Wed Apr  4 08:27:19 2001
@@ -0,0 +1,44 @@
+# This is an ELF platform.
+SCRIPT_NAME=elf
+
+# Handle both big- and little-ended 64-bit MIPS objects.
+ARCH=mips
+OUTPUT_FORMAT="elf64-tradlittlemips"
+BIG_OUTPUT_FORMAT="elf64-tradbigmips"
+LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
+
+# Note that the elf32 template is used for 64-bit emulations as well 
+# as 32-bit emulations.
+ELFSIZE=64
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+
+TEXT_START_ADDR=0x10000000
+DATA_ADDR=0x0400000000
+MAXPAGESIZE=0x100000
+NONPAGED_TEXT_START_ADDR=0x10000000
+SHLIB_TEXT_START_ADDR=0x0
+TEXT_DYNAMIC=
+ENTRY=__start
+
+# GOT-related settings.  
+OTHER_GOT_SYMBOLS='
+  _gp = ALIGN(16) + 0x7ff0;
+'
+OTHER_GOT_SECTIONS='
+  .lit8 : { *(.lit8) }
+  .lit4 : { *(.lit4) }
+'
+
+# Magic symbols.
+TEXT_START_SYMBOLS='_ftext = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+OTHER_BSS_SYMBOLS='_fbss = .;'
+
+# Magic sections.
+INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+OTHER_SECTIONS='
+  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+'


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