From 42b5c73927f9c86c0726b25e271b76133a8e9178 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 22 Jan 1993 22:30:52 +0000 Subject: [PATCH] Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com) * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF targets, linker script. * mipslit.sh: New file. Little endian MIPS emulation. * config/mips-lit.mt: New file. Use mipslit emulation. * configure.in (mips-dec-ultrix*): Use target mips-lit. * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o. (em_mipslit.c): New target. Uses mipslit.sh. --- ld/.Sanitize | 15 ++++++++++++++- ld/ChangeLog | 16 +++++++++++++++ ld/Makefile.in | 38 +++++++++++++++++++++++++++--------- ld/config/.Sanitize | 1 + ld/config/mips-lit.mt | 1 + ld/configure.in | 12 +++++++++--- ld/mips.sc-sh | 45 +++++++++++++++++++++++++++++++++++++++++++ ld/mipslit.sh | 5 +++++ 8 files changed, 120 insertions(+), 13 deletions(-) create mode 100644 ld/config/mips-lit.mt create mode 100644 ld/mips.sc-sh create mode 100644 ld/mipslit.sh diff --git a/ld/.Sanitize b/ld/.Sanitize index e22cec0e013..27ee748d753 100644 --- a/ld/.Sanitize +++ b/ld/.Sanitize @@ -101,6 +101,8 @@ m68kcoff.sc-sh m68kcoff.sh m88kbcs.sc-sh m88kbcs.sh +mips.sc-sh +mipslit.sh mri.c mri.h go32.sh @@ -130,7 +132,18 @@ echo Done in `pwd`. # # # $Log$ -# Revision 1.47 1992/09/25 18:10:41 sac +# Revision 1.48 1993/01/22 22:30:34 ian +# Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com) +# +# * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF +# targets, linker script. +# * mipslit.sh: New file. Little endian MIPS emulation. +# * config/mips-lit.mt: New file. Use mipslit emulation. +# * configure.in (mips-dec-ultrix*): Use target mips-lit. +# * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o. +# (em_mipslit.c): New target. Uses mipslit.sh. +# +# Revision 1.47 1992/09/25 18:10:41 sac # Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com) # # Added initial support for the z8k diff --git a/ld/ChangeLog b/ld/ChangeLog index f9a8a95ff72..0c40adb64f4 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,19 @@ +Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com) + + * mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF + targets, linker script. + * mipslit.sh: New file. Little endian MIPS emulation. + * config/mips-lit.mt: New file. Use mipslit emulation. + * configure.in (mips-dec-ultrix*): Use target mips-lit. + * Makefile.in (ALL_EMULATIONS): Added em_mipslit.o. + (em_mipslit.c): New target. Uses mipslit.sh. + +Thu Jan 14 15:30:27 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (install): Install ld as both $(tooldir)/bin/ld and + $(tooldir)/bin/gld, so that gcc can find it with or without + collect2. + Mon Jan 11 18:50:07 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * ldwrite.c: Removed perform_relocation, copy_and_relocate, and diff --git a/ld/Makefile.in b/ld/Makefile.in index 926766b6c1a..4c4ccb4bbd4 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -71,7 +71,7 @@ LIB_PATH = BASEDIR = ../.. INCLUDE = $(srcdir)/../include -INCLUDES = -I. -I$(srcdir) -I$(INCLUDE) +INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../bfd -I$(INCLUDE) # Where to find texinfo.tex to format docn with TeX TEXIDIR = $(srcdir)/../texinfo/fsf @@ -119,7 +119,7 @@ ALL_EMULATIONS=em_lnk960.o em_sun3.o em_i386aout.o em_go32.o \ em_m88kbcs.o em_a29k.o em_news.o em_hp300bsd.o \ em_h8300hms.o em_ebmon29k.o em_sun4.o em_gld960.o \ em_m68kcoff.o em_h8300xray.o em_st2000.o em_sa29200.o \ - em_vanilla.o em_i386coff.o em_z8ksim.o + em_vanilla.o em_i386coff.o em_z8ksim.o em_mipslit.o EMULATION_OFILES=${ALL_EMULATIONS} #EMULATION_OFILES=em_${EMUL}.o ${OTHER_EMULATIONS} @@ -151,7 +151,7 @@ LINTSOURCES= $(LDCSOURCES) $(BFDSOURCES) $(GENERATED_SOURCES) STAGESTUFF = *.x *.x[runN] *.sc[runN] $(GENERATED_SOURCES) $(GENERATED_HEADERS) $(OFILES) mkscript -all: Makefile $(LD_PROG) +all: $(LD_PROG) check: bootstrap check-cdtest info: ld.info @@ -161,10 +161,19 @@ ldgram.h ldgram.c: ldgram.y mv -f y.tab.c ldgram.c mv -f y.tab.h ldgram.h -ldmain.o: ldmain.c - $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) -DDEFAULT_EMULATION='"$(EMUL)"' -c $< -ldemul-list.h: Makefile +DEF_EMUL = ` if [ -z "$(EMUL)" ] ; then \ + echo "you must set a default emulation" 1>&2 ; \ + exit 1 ; \ + else \ + echo -DDEFAULT_EMULATION='"$(EMUL)"' ; \ + fi` + + +ldmain.o: ldmain.c + $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) -c $< + +ldemul-list.h: (echo "/* This file is automatically generated. DO NOT EDIT! */";\ for f in `echo " " ${EMULATION_OFILES} "" \ | sed -e 's/em_/ld/g' -e 's/ ld/ /g' -e 's/[.]o//g'`; do \ @@ -180,7 +189,7 @@ ldemul-list.h: Makefile ldemul.o: ldemul-list.h -ldlex.c: ldlex.l +ldlex.c: ldlex.l ldgram.h $(LEX) -I -Cem $(srcdir)/ldlex.l mv lex.yy.c ldlex.c @@ -246,6 +255,9 @@ em_m68kcoff.c: $(srcdir)/m68kcoff.sh \ em_i386coff.c: $(srcdir)/i386coff.sh \ $(srcdir)/generic.em $(srcdir)/i386coff.sc-sh ${GEN_DEPENDS} ${GENSCRIPTS} i386coff.sh +em_mipslit.c: $(srcdir)/mipslit.sh \ + $(srcdir)/generic.em $(srcdir)/mips.sc-sh ${GEN_DEPENDS} + ${GENSCRIPTS} mipslit.sh $(LD_PROG): $(OFILES) $(BFDLIB) $(LIBIBERTY) $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(LDFLAGS) -o $(LD_PROG) $(OFILES) $(BFDLIB) $(LIBIBERTY) $(LOADLIBES) @@ -376,10 +388,17 @@ ld-index.me: ld.me ./mkscript: $(srcdir)/mkscript.c $(HOST_CC) -o mkscript $(srcdir)/mkscript.c -ldlex.c: ldlex.l ldgram.h ldlex.o: ldlex.c ldgram.h ldgram.o: ldgram.c ldgram.c:ldgram.y +ldexp.o: ldexp.c ldgram.h +ldctor.o: ldctor.c ldgram.h +ldlang.o: ldlang.c ldgram.h +ldmain.o: ldmain.c ldgram.h +ldwrite.o: ldwrite.c ldgram.h +lexsup.o: lexsup.c ldgram.h +mri.o: mri.c ldgram.h +relax.o: relax.c ldgram.h h8300hms.o:h8300hms.c h8300xray.o:h8300xray.c @@ -431,7 +450,7 @@ mostlyclean: clean: mostlyclean -rm -f $(LD_PROG) distclean: clean - -rm -f Makefile config.status TAGS + -rm -f Makefile config.status TAGS sysdep.h realclean: distclean -rm -f $(LDDISTSTUFF) @@ -470,6 +489,7 @@ install: $(LD_PROG) rm -f $(tooldir)/bin/ld; \ ln $(bindir)/$$n $(tooldir)/bin/ld \ || $(INSTALL_PROGRAM) ld.new $(tooldir)/bin/ld; \ + ln $(tooldir)/bin/ld $(tooldir)/bin/gld; \ else true; fi install-info: info diff --git a/ld/config/.Sanitize b/ld/config/.Sanitize index 6576154743d..096cac93b41 100644 --- a/ld/config/.Sanitize +++ b/ld/config/.Sanitize @@ -47,6 +47,7 @@ m68k-coff.mt m68k.mt m68kv.mt m88k-bcs.mt +mips-lit.mt news.mt ose68.mt rtbsd.mh diff --git a/ld/config/mips-lit.mt b/ld/config/mips-lit.mt new file mode 100644 index 00000000000..60138e8b8ed --- /dev/null +++ b/ld/config/mips-lit.mt @@ -0,0 +1 @@ +EMUL=mipslit diff --git a/ld/configure.in b/ld/configure.in index ad0b260c134..9b2a9a5e981 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -34,9 +34,13 @@ case "${target}" in ;; m68k-sun-sunos[34]*) my_target=sun3 ;; - sparclite-fujitsu-*) my_target=sun4 + sparclite*-fujitsu-*) my_target=sun4 ;; - i960-wrs-vxworks*) my_target=vxworks960 + sparc*-*-aout) my_target=sun4 + ;; + i960-wrs-vxworks*) my_target=i960 + ;; + i960-intel-nindy) my_target=i960 ;; m68k-wrs-vxworks*) my_target=vxworks68 ;; @@ -44,7 +48,7 @@ case "${target}" in ;; m683?2-wrs-vxworks*) my_target=vxworks68 ;; - sparc-wrs-vxworks*) my_target=vxsparc + sparc*-wrs-vxworks*) my_target=sun4 ;; m68k-ericsson-ose) my_target=ose68 ;; @@ -87,6 +91,8 @@ case "${target}" in m68*-*-*) echo '***' "Unknown m68k target vendor for ld:" ${target_vendor} 1>&2 exit 1 ;; + mips-dec-ultrix*) my_target=mips-lit + ;; z8k-*sim) my_target=z8ksim ;; *-*-aout) my_target=${target_cpu}-${target_vendor} diff --git a/ld/mips.sc-sh b/ld/mips.sc-sh new file mode 100644 index 00000000000..3e3ba75d90d --- /dev/null +++ b/ld/mips.sc-sh @@ -0,0 +1,45 @@ +# Linker script for MIPS. This works on a DECstation running Ultrix, +# and may work on other platforms as well. +# Ian Lance Taylor . +cat <