From 74459f0e3ead9efad8aa29f2545b53e9c5f9988d Mon Sep 17 00:00:00 2001 From: Timothy Wall Date: Tue, 20 Jun 2000 13:29:07 +0000 Subject: [PATCH] tic54x/ibmc54xdsp target for ld. --- ld/ChangeLog | 11 ++ ld/Makefile.am | 4 + ld/Makefile.in | 4 + ld/configure.tgt | 1 + ld/emulparams/tic54xcoff.sh | 8 ++ ld/emultempl/ticoff.em | 199 +++++++++++++++++++++++++++++ ld/gen-doc.texi | 1 + ld/ld.texinfo | 18 +++ ld/ldgram.y | 4 +- ld/ldlang.c | 7 + ld/scripttempl/tic54xcoff.sc | 52 ++++++++ ld/testsuite/ld-checks/asm.s | 4 +- ld/testsuite/ld-scripts/script.exp | 10 +- 13 files changed, 318 insertions(+), 5 deletions(-) create mode 100644 ld/emulparams/tic54xcoff.sh create mode 100644 ld/emultempl/ticoff.em create mode 100644 ld/scripttempl/tic54xcoff.sc diff --git a/ld/ChangeLog b/ld/ChangeLog index cc5df525763..2e6e58203a9 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2000-06-20 Timothy Wall + + * scripttempl/tic54xcoff.sc: New. + * ldlang.c (wild_doit): Propagate SEC_BLOCK flag. + * gen-doc.texi: Add flag for TI COFF. + * ld.texinfo: Add documentation for TI COFF handling switches. + * emultempl/ticoff.em: New. TI COFF handling. + * configure.tgt: Add tic54x target. + * Makefile.am: Add tic54x target. + * Makefile.in: Ditto. + 2000-06-20 Alan Modra * ldmain.c (set_scripts_dir): Correct pointer comparison when diff --git a/ld/Makefile.am b/ld/Makefile.am index 814bb9af973..ec708dfb0a2 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -221,6 +221,7 @@ ALL_EMULATIONS = \ esun4.o \ etic30aout.o \ etic30coff.o \ + etic54xcoff.o \ etic80coff.o \ evanilla.o \ evax.o \ @@ -705,6 +706,9 @@ etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \ etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)" +etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \ + $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS} + ${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)" etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)" diff --git a/ld/Makefile.in b/ld/Makefile.in index b6f9bc12151..fc229e5b73a 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -324,6 +324,7 @@ ALL_EMULATIONS = \ esun4.o \ etic30aout.o \ etic30coff.o \ + etic54xcoff.o \ etic80coff.o \ evanilla.o \ evax.o \ @@ -1404,6 +1405,9 @@ etic30aout.c: $(srcdir)/emulparams/tic30aout.sh \ etic30coff.c: $(srcdir)/emulparams/tic30coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)" +etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \ + $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS} + ${GENSCRIPTS} tic54xcoff "$(tdir_tic54xcoff)" etic80coff.c: $(srcdir)/emulparams/tic80coff.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic80coff.sc ${GEN_DEPENDS} ${GENSCRIPTS} tic80coff "$(tdir_tic80coff)" diff --git a/ld/configure.tgt b/ld/configure.tgt index 7fa41b5f9dc..bf92fbab8e7 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -284,6 +284,7 @@ powerpc-*-beos*) targ_emul=aixppc ;; rs6000-*-aix*) targ_emul=aixrs6 ;; tic30-*-*aout*) targ_emul=tic30aout ;; tic30-*-*coff*) targ_emul=tic30coff ;; +tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;; tic80-*-*) targ_emul=tic80coff ;; v850-*-*) targ_emul=v850 ;; v850e-*-*) targ_emul=v850 ;; diff --git a/ld/emulparams/tic54xcoff.sh b/ld/emulparams/tic54xcoff.sh new file mode 100644 index 00000000000..70c1ee2ce60 --- /dev/null +++ b/ld/emulparams/tic54xcoff.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=tic54xcoff +OUTPUT_FORMAT="coff1-c54x" +ARCH=tic54x +ENTRY=_c_int00 +TEXT_START_ADDR=0x0080 +TARGET_PAGE_SIZE=0x1000 +TEMPLATE_NAME=ticoff +OUTPUT_FORMAT_TEMPLATE=tic54x diff --git a/ld/emultempl/ticoff.em b/ld/emultempl/ticoff.em new file mode 100644 index 00000000000..21bd35d5e5e --- /dev/null +++ b/ld/emultempl/ticoff.em @@ -0,0 +1,199 @@ +# This shell script emits a C file. -*- C -*- +# It does some substitutions. +(echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) +cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <