2003-06-03 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 3 Jun 2003 21:43:52 +0000 (21:43 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 3 Jun 2003 21:43:52 +0000 (21:43 +0000)
        and Bernd Schmidt   <bernds@redhat.com>
and Alexandre Oliva <aoliva@redhat.com>
* 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
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/h8300sx.sh [new file with mode: 0644]
ld/emulparams/h8300sxelf.sh [new file with mode: 0644]
ld/scripttempl/h8300sx.sc [new file with mode: 0644]

index 2652c8d..a14119f 100644 (file)
@@ -1,3 +1,13 @@
+2003-06-03  Michael Snyder  <msnyder@redhat.com>
+        and Bernd Schmidt   <bernds@redhat.com>
+       and Alexandre Oliva <aoliva@redhat.com>
+       * 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 <hongjiu.lu@intel.com>
 
        * ldmisc.c: Include "bfdlink.h".
index 0ad0824..1a54aee 100644 (file)
@@ -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)"
index bd4b71c..8aa0505 100644 (file)
@@ -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)"
index 76ea94c..8e94992 100644 (file)
@@ -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 (file)
index 0000000..b46b6f9
--- /dev/null
@@ -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 (file)
index 0000000..18f82f6
--- /dev/null
@@ -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 (file)
index 0000000..d3807c0
--- /dev/null
@@ -0,0 +1,97 @@
+TORS=".tors :
+       {
+         ___ctors = . ;
+         *(.ctors)
+         ___ctors_end = . ;
+         ___dtors = . ;
+         *(.dtors)
+         ___dtors_end = . ;
+       } > ram"
+
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH(h8300sx)
+ENTRY("_start")
+
+/* The memory size is 256KB to coincide with the simulator.
+   Don't change either without considering the other.  */
+
+MEMORY
+{
+       /* 0xc4 is a magic entry.  We should have the linker just
+          skip over it one day...  */
+       vectors : o = 0x0000, l = 0xc4
+       magicvectors : o = 0xc4, l = 0x3c
+       /* We still only use 256k as the main ram size.  */
+       ram    : o = 0x0100, l = 0x3fefc
+       /* The stack starts at the top of main ram.  */
+       topram : o = 0x3fffc, l = 0x4
+       /* This holds variables in the "tiny" sections.  */
+       tiny   : o = 0xff8000, l = 0x7f00
+       /* At the very top of the address space is the 8-bit area.  */
+       eight  : o = 0xffff00, l = 0x100
+}
+
+SECTIONS
+{
+.vectors :
+       {
+         /* Use something like this to place a specific
+            function's address into the vector table.
+
+            LONG (ABSOLUTE (_foobar)).  */
+
+         *(.vectors)
+       } ${RELOCATING+ > 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