This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] H8/300sx port for gas, sim, and opcodes (5/5)


Michael Snyder wrote:
> 
> This is the linker part of the h8/300sx port.
> 
>   -------------------------------------------------------------------------------
> 2003-05-21  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.

Committed.

> 
> Index: Makefile.am
> ===================================================================
> RCS file: /cvs/src/src/ld/Makefile.am,v
> retrieving revision 1.130
> diff -p -r1.130 Makefile.am
> *** Makefile.am 9 May 2003 20:05:04 -0000       1.130
> --- Makefile.am 21 May 2003 20:24:20 -0000
> *************** ALL_EMULATIONS = \
> *** 200,209 ****
> --- 200,211 ----
>         eh8300elf.o \
>         eh8300hn.o \
>         eh8300sn.o \
> +       eh8300sx.o \
>         eh8300helf.o \
>         eh8300self.o \
>         eh8300hnelf.o \
>         eh8300snelf.o \
> +       eh8300sxelf.o \
>         eh8500.o \
>         eh8500b.o \
>         eh8500c.o \
> *************** eh8300hn.c: $(srcdir)/emulparams/h8300hn
> *** 842,847 ****
> --- 844,852 ----
>   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)"
> *************** eh8300snelf.c: $(srcdir)/emulparams/h830
> *** 861,866 ****
> --- 866,875 ----
>     $(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: Makefile.in
> ===================================================================
> RCS file: /cvs/src/src/ld/Makefile.in,v
> retrieving revision 1.141
> diff -p -r1.141 Makefile.in
> *** Makefile.in 9 May 2003 20:05:04 -0000       1.141
> --- Makefile.in 21 May 2003 20:24:20 -0000
> *************** ALL_EMULATIONS = \
> *** 314,323 ****
> --- 314,325 ----
>         eh8300elf.o \
>         eh8300hn.o \
>         eh8300sn.o \
> +       eh8300sx.o \
>         eh8300helf.o \
>         eh8300self.o \
>         eh8300hnelf.o \
>         eh8300snelf.o \
> +       eh8300sxelf.o \
>         eh8500.o \
>         eh8500b.o \
>         eh8500c.o \
> *************** eh8300hn.c: $(srcdir)/emulparams/h8300hn
> *** 1568,1573 ****
> --- 1570,1578 ----
>   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)"
> *************** eh8300snelf.c: $(srcdir)/emulparams/h830
> *** 1587,1592 ****
> --- 1592,1601 ----
>     $(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: configure.tgt
> ===================================================================
> RCS file: /cvs/src/src/ld/configure.tgt,v
> retrieving revision 1.128
> diff -p -r1.128 configure.tgt
> *** configure.tgt       21 May 2003 13:06:29 -0000      1.128
> --- configure.tgt       21 May 2003 20:24:20 -0000
> *************** thumb-*-pe)             targ_emul=armpe ;
> *** 263,273 ****
>   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"
>                         ;;
>   h8300-*-elf*)
>                         targ_emul=h8300elf;
> !                       targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf"
>                         ;;
>   h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
>                         targ_emul=h8500
> --- 263,273 ----
>   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 h8300sx"
>                         ;;
>   h8300-*-elf*)
>                         targ_emul=h8300elf;
> !                       targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf"
>                         ;;
>   h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
>                         targ_emul=h8500
> Index: emulparams/h8300sx.sh
> ===================================================================
> RCS file: emulparams/h8300sx.sh
> diff -N emulparams/h8300sx.sh
> *** /dev/null   1 Jan 1970 00:00:00 -0000
> --- emulparams/h8300sx.sh       21 May 2003 20:24:20 -0000
> ***************
> *** 0 ****
> --- 1,5 ----
> + SCRIPT_NAME=h8300sx
> + OUTPUT_FORMAT="coff-h8300"
> + TEXT_START_ADDR=0x8000
> + TARGET_PAGE_SIZE=128
> + ARCH=h8300
> Index: emulparams/h8300sxelf.sh
> ===================================================================
> RCS file: emulparams/h8300sxelf.sh
> diff -N emulparams/h8300sxelf.sh
> *** /dev/null   1 Jan 1970 00:00:00 -0000
> --- emulparams/h8300sxelf.sh    21 May 2003 20:24:20 -0000
> ***************
> *** 0 ****
> --- 1,3 ----
> + . ${srcdir}/emulparams/h8300elf.sh
> + ARCH="h8300:h8300sx"
> + STACK_ADDR=0x2fefc
> Index: scripttempl/h8300sx.sc
> ===================================================================
> RCS file: scripttempl/h8300sx.sc
> diff -N scripttempl/h8300sx.sc
> *** /dev/null   1 Jan 1970 00:00:00 -0000
> --- scripttempl/h8300sx.sc      21 May 2003 20:24:20 -0000
> ***************
> *** 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]