aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-01-22 22:30:52 +0000
committerIan Lance Taylor <ian@airs.com>1993-01-22 22:30:52 +0000
commit42b5c73927f9c86c0726b25e271b76133a8e9178 (patch)
tree80786c8f5eedf148e80f45cbad461d7996e6327f
parent746ed5252937d09dd4abc06e13c168901468b28c (diff)
downloadgdb-42b5c73927f9c86c0726b25e271b76133a8e9178.zip
gdb-42b5c73927f9c86c0726b25e271b76133a8e9178.tar.gz
gdb-42b5c73927f9c86c0726b25e271b76133a8e9178.tar.bz2
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.
-rw-r--r--ld/.Sanitize15
-rw-r--r--ld/ChangeLog16
-rw-r--r--ld/Makefile.in36
-rw-r--r--ld/config/.Sanitize1
-rw-r--r--ld/config/mips-lit.mt1
-rw-r--r--ld/configure.in12
-rw-r--r--ld/mips.sc-sh45
-rw-r--r--ld/mipslit.sh5
8 files changed, 119 insertions, 12 deletions
diff --git a/ld/.Sanitize b/ld/.Sanitize
index e22cec0..27ee748 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 f9a8a95..0c40adb 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 926766b..4c4ccb4 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
+
+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 \
@@ -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 6576154..096cac9 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 0000000..60138e8
--- /dev/null
+++ b/ld/config/mips-lit.mt
@@ -0,0 +1 @@
+EMUL=mipslit
diff --git a/ld/configure.in b/ld/configure.in
index ad0b260..9b2a9a5 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 0000000..3e3ba75
--- /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 <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
diff --git a/ld/mipslit.sh b/ld/mipslit.sh
new file mode 100644
index 0000000..50365b8
--- /dev/null
+++ b/ld/mipslit.sh
@@ -0,0 +1,5 @@
+EMULATION_NAME=mipslit
+SCRIPT_NAME=mips
+OUTPUT_FORMAT="ecoff-littlemips"
+PAGE_SIZE=0x1000000
+ARCH=mips