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.
This commit is contained in:
Ian Lance Taylor 1993-01-22 22:30:52 +00:00
parent 746ed52529
commit 42b5c73927
8 changed files with 120 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -47,6 +47,7 @@ m68k-coff.mt
m68k.mt
m68kv.mt
m88k-bcs.mt
mips-lit.mt
news.mt
ose68.mt
rtbsd.mh

1
ld/config/mips-lit.mt Normal file
View File

@ -0,0 +1 @@
EMUL=mipslit

View File

@ -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}

45
ld/mips.sc-sh Normal file
View File

@ -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 <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

5
ld/mipslit.sh Normal file
View File

@ -0,0 +1,5 @@
EMULATION_NAME=mipslit
SCRIPT_NAME=mips
OUTPUT_FORMAT="ecoff-littlemips"
PAGE_SIZE=0x1000000
ARCH=mips