From 65982ba6e7c672622ff83141c1c7f563f0427132 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 3 Jun 2003 21:43:52 +0000 Subject: [PATCH] 2003-06-03 Michael Snyder and Bernd Schmidt and Alexandre Oliva * Makefile.am: Add new emulations for h8300sx. * Makefile.in: Regenerate. * configure.tgt: Add new emulations. * emulparams/h8300sx.sh: New emulation. * emulparams/h8300sxelf.sh: Ditto. * scripttempl/h8300sx.sc: Ditto. --- ld/ChangeLog | 10 ++++ ld/Makefile.am | 9 ++++ ld/Makefile.in | 9 ++++ ld/configure.tgt | 4 +- ld/emulparams/h8300sx.sh | 5 ++ ld/emulparams/h8300sxelf.sh | 3 ++ ld/scripttempl/h8300sx.sc | 97 +++++++++++++++++++++++++++++++++++++ 7 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 ld/emulparams/h8300sx.sh create mode 100644 ld/emulparams/h8300sxelf.sh create mode 100644 ld/scripttempl/h8300sx.sc diff --git a/ld/ChangeLog b/ld/ChangeLog index 2652c8d4bb9..a14119f1863 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2003-06-03 Michael Snyder + and Bernd Schmidt + and Alexandre Oliva + * Makefile.am: Add new emulations for h8300sx. + * Makefile.in: Regenerate. + * configure.tgt: Add new emulations. + * emulparams/h8300sx.sh: New emulation. + * emulparams/h8300sxelf.sh: Ditto. + * scripttempl/h8300sx.sc: Ditto. + 2003-06-03 H.J. Lu * ldmisc.c: Include "bfdlink.h". diff --git a/ld/Makefile.am b/ld/Makefile.am index 0ad082412a8..1a54aee83e4 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -200,10 +200,12 @@ ALL_EMULATIONS = \ eh8300elf.o \ eh8300hn.o \ eh8300sn.o \ + eh8300sx.o \ eh8300helf.o \ eh8300self.o \ eh8300hnelf.o \ eh8300snelf.o \ + eh8300sxelf.o \ eh8500.o \ eh8500b.o \ eh8500c.o \ @@ -842,6 +844,9 @@ eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \ eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300sn "$(tdir_h8300sn)" +eh8300sx.c: $(srcdir)/emulparams/h8300sx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sx.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300sx "$(tdir_h8300sx)" eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)" @@ -861,6 +866,10 @@ eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)" +eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \ + $(srcdir)/emulparams/h8300elf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)" eh8500.c: $(srcdir)/emulparams/h8500.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8500 "$(tdir_h8500)" diff --git a/ld/Makefile.in b/ld/Makefile.in index bd4b71cf581..8aa05054d0b 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -314,10 +314,12 @@ ALL_EMULATIONS = \ eh8300elf.o \ eh8300hn.o \ eh8300sn.o \ + eh8300sx.o \ eh8300helf.o \ eh8300self.o \ eh8300hnelf.o \ eh8300snelf.o \ + eh8300sxelf.o \ eh8500.o \ eh8500b.o \ eh8500c.o \ @@ -1568,6 +1570,9 @@ eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \ eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300sn "$(tdir_h8300sn)" +eh8300sx.c: $(srcdir)/emulparams/h8300sx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sx.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300sx "$(tdir_h8300sx)" eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)" @@ -1587,6 +1592,10 @@ eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)" +eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \ + $(srcdir)/emulparams/h8300elf.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)" eh8500.c: $(srcdir)/emulparams/h8500.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS} ${GENSCRIPTS} h8500 "$(tdir_h8500)" diff --git a/ld/configure.tgt b/ld/configure.tgt index 76ea94c42c2..8e9499251b0 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -263,11 +263,11 @@ thumb-*-pe) targ_emul=armpe ; xscale-*-coff) targ_emul=armcoff ;; xscale-*-elf) targ_emul=armelf ;; h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*) - targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn" + targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx" ;; h8300-*-elf*) targ_emul=h8300elf; - targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf" + targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf" ;; h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*) targ_emul=h8500 diff --git a/ld/emulparams/h8300sx.sh b/ld/emulparams/h8300sx.sh new file mode 100644 index 00000000000..b46b6f97bc4 --- /dev/null +++ b/ld/emulparams/h8300sx.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=h8300sx +OUTPUT_FORMAT="coff-h8300" +TEXT_START_ADDR=0x8000 +TARGET_PAGE_SIZE=128 +ARCH=h8300 diff --git a/ld/emulparams/h8300sxelf.sh b/ld/emulparams/h8300sxelf.sh new file mode 100644 index 00000000000..18f82f64f43 --- /dev/null +++ b/ld/emulparams/h8300sxelf.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/h8300elf.sh +ARCH="h8300:h8300sx" +STACK_ADDR=0x2fefc diff --git a/ld/scripttempl/h8300sx.sc b/ld/scripttempl/h8300sx.sc new file mode 100644 index 00000000000..d3807c0d0cd --- /dev/null +++ b/ld/scripttempl/h8300sx.sc @@ -0,0 +1,97 @@ +TORS=".tors : + { + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ; + } > ram" + +cat < vectors} + +.text : + { + *(.rodata) + *(.text) + *(.strings) + ${RELOCATING+ _etext = . ; } + } ${RELOCATING+ > ram} + +${CONSTRUCTING+${TORS}} + +.data : + { + *(.data) + ${RELOCATING+ _edata = . ; } + } ${RELOCATING+ > ram} + +.bss : + { + ${RELOCATING+ _bss_start = . ;} + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } + } ${RELOCATING+ >ram} + +.stack : + { + ${RELOCATING+ _stack = . ; } + *(.stack) + } ${RELOCATING+ > topram} + +.tiny : + { + *(.tiny) + } ${RELOCATING+ > tiny} + +.eight : + { + *(.eight) + } ${RELOCATING+ > eight} + +.stab 0 ${RELOCATING+(NOLOAD)} : + { + [ .stab ] + } + +.stabstr 0 ${RELOCATING+(NOLOAD)} : + { + [ .stabstr ] + } +} +EOF -- 2.30.2