diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2015-02-23 17:04:53 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2015-02-23 17:04:53 +0000 |
commit | 5518c738a47f0282d6fcc6768e1cde598e9538e0 (patch) | |
tree | 050864a60a9e3980b1041bdcc967cbc847c545cd /ld | |
parent | 1f10ba14bc8c53120432ccc7b2ba5605b4cee80e (diff) | |
download | gdb-5518c738a47f0282d6fcc6768e1cde598e9538e0.zip gdb-5518c738a47f0282d6fcc6768e1cde598e9538e0.tar.gz gdb-5518c738a47f0282d6fcc6768e1cde598e9538e0.tar.bz2 |
Add support for the h8300-linux target.
ld * Makefile.am: (ALL_EMULATION_SOURCES): Add new emulations.
* Makefile.in: Regenerate.
* configure.tgt: Add h8300-*-linux
* emulparams/h8300elf_linux.sh: Add new emulation.
* emulparams/h8300helf_linux.sh: Likewise.
* emulparams/h8300self_linux.sh: Likewise.
* emulparams/h8300sxelf_linux.sh: Likewise.
bfd * config.bfd: Add h8300-*-linux.
* configure.ac: Add h8300_elf32_linux_vec.
* configure: Regenerate.
* elf32-h8300.c: Likewise.
* targets.c(_bfd_target_vector): Likewise.
gas * config/tc-h8300.c (line_separater_chars): Add a version for
h8300-linux that includes a separator.
(default_mach): New variable.
(md_main): Use it.
(md_longopts): Add '--march' option.
(md_parse_option): Parse the new option.
* config/tc-h8300.h (TARGET_FORMAT): Add elf32-h8300-linux.
* configure.tgt: Add h8300-*-linux
* doc/c-h8300.texi: Document --march.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 10 | ||||
-rw-r--r-- | ld/Makefile.am | 23 | ||||
-rw-r--r-- | ld/Makefile.in | 24 | ||||
-rw-r--r-- | ld/configure.tgt | 3 | ||||
-rw-r--r-- | ld/emulparams/h8300elf_linux.sh | 26 | ||||
-rw-r--r-- | ld/emulparams/h8300helf_linux.sh | 3 | ||||
-rw-r--r-- | ld/emulparams/h8300self_linux.sh | 3 | ||||
-rw-r--r-- | ld/emulparams/h8300sxelf_linux.sh | 16 |
8 files changed, 107 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 30f965e..d952670 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2015-01-21 Yoshinori Sato <ysato@users.sourceforge.jp> + + * Makefile.am: (ALL_EMULATION_SOURCES): Add new emulations. + * Makefile.in: Regenerate. + * configure.tgt: Add h8300-*-linux + * emulparams/h8300elf_linux.sh: Add new emulation. + * emulparams/h8300helf_linux.sh: Likewise. + * emulparams/h8300self_linux.sh: Likewise. + * emulparams/h8300sxelf_linux.sh: Likewise. + 2015-02-23 Nick Clifton <nickc@redhat.com> * lexsup.c (parse_args): Produce a more reasonable error message diff --git a/ld/Makefile.am b/ld/Makefile.am index 75a481b..11de1c4 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -286,16 +286,20 @@ ALL_EMULATION_SOURCES = \ eh8300elf.c \ eh8300h.c \ eh8300helf.c \ + eh8300elf_linux.c \ eh8300hn.c \ eh8300hnelf.c \ + eh8300helf_linux.c \ eh8300s.c \ eh8300self.c \ + eh8300self_linux.c \ eh8300sn.c \ eh8300snelf.c \ eh8300sx.c \ eh8300sxelf.c \ eh8300sxn.c \ eh8300sxnelf.c \ + eh8300sxelf_linux.c \ eh8500.c \ eh8500b.c \ eh8500c.c \ @@ -1305,6 +1309,10 @@ eh8300.c: $(srcdir)/emulparams/h8300.sh \ eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eh8300elf_linux.c: $(srcdir)/emulparams/h8300elf_linux.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300elf_linux "$(tdir_h8300elf)" + eh8300h.c: $(srcdir)/emulparams/h8300h.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS} @@ -1312,6 +1320,11 @@ eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eh8300helf_linux.c: $(srcdir)/emulparams/h8300helf_linux.sh \ + $(srcdir)/emulparams/h8300elf_linux.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300helf_linux "$(tdir_h8300helf)" + eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS} @@ -1326,6 +1339,11 @@ eh8300self.c: $(srcdir)/emulparams/h8300self.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eh8300self_linux.c: $(srcdir)/emulparams/h8300self_linux.sh \ + $(srcdir)/emulparams/h8300elf.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300self_linux "$(tdir_h8300self)" + eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS} @@ -1340,6 +1358,11 @@ eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eh8300sxelf_linux.c: $(srcdir)/emulparams/h8300sxelf_linux.sh \ + $(srcdir)/emulparams/h8300elf.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300sxelf_linux "$(tdir_h8300sxelf)" + eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index 6c54fda..9b803d7 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -611,16 +611,20 @@ ALL_EMULATION_SOURCES = \ egld960coff.c \ eh8300.c \ eh8300elf.c \ + eh8300elf_linux.c \ eh8300h.c \ eh8300helf.c \ + eh8300helf_linux.c \ eh8300hn.c \ eh8300hnelf.c \ eh8300s.c \ eh8300self.c \ + eh8300self_linux.c \ eh8300sn.c \ eh8300snelf.c \ eh8300sx.c \ eh8300sxelf.c \ + eh8300sxelf_linux.c \ eh8300sxn.c \ eh8300sxnelf.c \ eh8500.c \ @@ -1273,16 +1277,20 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/egld960coff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300elf_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300h.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300helf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300helf_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300hn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300hnelf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300s.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300self.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300self_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300snelf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sxelf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sxelf_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sxn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8300sxnelf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eh8500.Po@am__quote@ @@ -2792,7 +2800,9 @@ eh8300.c: $(srcdir)/emulparams/h8300.sh \ eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} - +eh8300elf_linux.c: $(srcdir)/emulparams/h8300elf_linux.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300elf_linux "$(tdir_h8300elf)" eh8300h.c: $(srcdir)/emulparams/h8300h.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300h.sc ${GEN_DEPENDS} @@ -2800,6 +2810,10 @@ eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eh8300helf_linux.c: $(srcdir)/emulparams/h8300helf_linux.sh \ + $(srcdir)/emulparams/h8300elf_linux.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300helf_linux "$(tdir_h8300helf)" eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS} @@ -2814,6 +2828,10 @@ eh8300self.c: $(srcdir)/emulparams/h8300self.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eh8300self_linux.c: $(srcdir)/emulparams/h8300self_linux.sh \ + $(srcdir)/emulparams/h8300elf.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300self_linux "$(tdir_h8300self)" eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS} @@ -2828,6 +2846,10 @@ eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \ $(srcdir)/emulparams/h8300elf.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eh8300sxelf_linux.c: $(srcdir)/emulparams/h8300sxelf_linux.sh \ + $(srcdir)/emulparams/h8300elf.sh \ + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} h8300sxelf_linux "$(tdir_h8300sxelf)" eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS} diff --git a/ld/configure.tgt b/ld/configure.tgt index f16c845..a46fbca 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -198,6 +198,9 @@ h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*) h8300-*-elf* | h8300-*-rtems*) targ_emul=h8300elf; targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf" ;; +h8300-*-linux*) + targ_emul=h8300elf_linux; + targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux" ;; h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*) targ_emul=h8500 targ_extra_emuls="h8500s h8500b h8500m h8500c" diff --git a/ld/emulparams/h8300elf_linux.sh b/ld/emulparams/h8300elf_linux.sh new file mode 100644 index 0000000..97050dd --- /dev/null +++ b/ld/emulparams/h8300elf_linux.sh @@ -0,0 +1,26 @@ +# If you change this file, please also look at files which source this one: +# h8300helf.sh h8300self.sh + +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-h8300-linux" +NO_REL_RELOCS=yes +TEXT_START_ADDR=0x100 +MAXPAGESIZE=2 +TARGET_PAGE_SIZE=128 +ARCH=h8300 +TEMPLATE_NAME=elf32 +EMBEDDED=yes +STACK_ADDR=0xfefc +TINY_READONLY_SECTION=".tinyrodata : + { + *(.tinyrodata) + } =0" +TINY_DATA_SECTION=".tinydata ${RELOCATING+0xff8000} : + { + *(.tinydata) + ${RELOCATING+ _tinydata = .; } + }" +TINY_BSS_SECTION=".tinybss : ${RELOCATING+AT (_tinydata)} + { + *(.tinybss) + }" diff --git a/ld/emulparams/h8300helf_linux.sh b/ld/emulparams/h8300helf_linux.sh new file mode 100644 index 0000000..c66ff94 --- /dev/null +++ b/ld/emulparams/h8300helf_linux.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/h8300elf_linux.sh +ARCH="h8300:h8300h" +STACK_ADDR=0x2fefc diff --git a/ld/emulparams/h8300self_linux.sh b/ld/emulparams/h8300self_linux.sh new file mode 100644 index 0000000..76f3ed7 --- /dev/null +++ b/ld/emulparams/h8300self_linux.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/h8300elf_linux.sh +ARCH="h8300:h8300s" +STACK_ADDR=0x2fefc diff --git a/ld/emulparams/h8300sxelf_linux.sh b/ld/emulparams/h8300sxelf_linux.sh new file mode 100644 index 0000000..b06dc2e --- /dev/null +++ b/ld/emulparams/h8300sxelf_linux.sh @@ -0,0 +1,16 @@ +. ${srcdir}/emulparams/h8300elf_linux.sh +ARCH="h8300:h8300sx" +STACK_ADDR=0x2fefc +TINY_READONLY_SECTION=".tinyrodata : + { + *(.tinyrodata) + } =0" +TINY_DATA_SECTION=".tinydata 0xff8000 : + { + *(.tinydata) + ${RELOCATING+ _tinydata = .; } + }" +TINY_BSS_SECTION=".tinybss : AT (_tinydata) + { + *(.tinybss) + }" |