m68kcoff.sh
m88kbcs.sc-sh
m88kbcs.sh
+mips.sc-sh
+mipslit.sh
mri.c
mri.h
go32.sh
#
#
# $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
+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
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
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}
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
mv -f y.tab.c ldgram.c
mv -f y.tab.h ldgram.h
+
+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) -DDEFAULT_EMULATION='"$(EMUL)"' -c $<
+ $(CC) $(CFLAGS) $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CDEFINES) $(DEF_EMUL) -c $<
-ldemul-list.h: Makefile
+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 \
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
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)
./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
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)
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
m68k.mt
m68kv.mt
m88k-bcs.mt
+mips-lit.mt
news.mt
ose68.mt
rtbsd.mh
--- /dev/null
+EMUL=mipslit
;;
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
;;
;;
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
;;
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}
--- /dev/null
+# Linker script for MIPS. This works on a DECstation running Ultrix,
+# and may work on other platforms as well.
+# Ian Lance Taylor <ian@cygnus.com>.
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+${LIB_SEARCH_DIRS}
+
+ENTRY(__start)
+
+SECTIONS
+{
+ .text ${RELOCATING+ 0x400000 + SIZEOF_HEADERS} : {
+ *(.init)
+ ${RELOCATING+ eprol = .};
+ *(.text)
+ *(.fini)
+ ${RELOCATING+ etext = .};
+ }
+ .rdata ${RELOCATING+ 0x10000000} : {
+ *(.rdata)
+ }
+ .data ${RELOCATING+ .} : {
+ *(.data)
+ }
+ ${RELOCATING+ _gp = . + 0x8000};
+ .lit8 ${RELOCATING+ .} : {
+ *(.lit8)
+ }
+ .lit4 ${RELOCATING+ .} : {
+ *(.lit4)
+ }
+ .sdata ${RELOCATING+ .} : {
+ *(.sdata)
+ }
+ ${RELOCATING+ edata = .};
+ .sbss ${RELOCATING+ .} : {
+ *(.sbss)
+ }
+ .bss ${RELOCATING+ .} : {
+ *(.bss)
+ *(COMMON)
+ }
+ ${RELOCATING+ end = .};
+}
+EOF
--- /dev/null
+EMULATION_NAME=mipslit
+SCRIPT_NAME=mips
+OUTPUT_FORMAT="ecoff-littlemips"
+PAGE_SIZE=0x1000000
+ARCH=mips