From 20135e4cea8994900955e560910b2e675881fa95 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 16 Apr 2009 15:39:48 +0000 Subject: Add new binutils target: moxie --- ld/ChangeLog | 8 +++++++ ld/Makefile.am | 4 ++++ ld/Makefile.in | 4 ++++ ld/configure.tgt | 2 ++ ld/emulparams/elf32moxie.sh | 8 +++++++ ld/scripttempl/moxie.sc | 52 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 78 insertions(+) create mode 100644 ld/emulparams/elf32moxie.sh create mode 100644 ld/scripttempl/moxie.sc (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index 39e5555c27e..099275dd487 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2009-04-15 Anthony Green + + * configure.tgt: Add moxie support. + * Makefile.am: Add moxie files. + * Makefile.in: Rebuilt. + * emulparams/elf32moxie.sh: New file. + * scripttempl/moxie.sc: New file. + 2009-04-15 Kazu Hirata * ldlang.c: Do not include limits.h. diff --git a/ld/Makefile.am b/ld/Makefile.am index 2d0aed9456c..6a4139a1851 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -176,6 +176,7 @@ ALL_EMULATIONS = \ eelf32elmipvxworks.o \ eelf32fr30.o \ eelf32frv.o \ + eelf32moxie.o \ eelf32i370.o \ eelf32ip2k.o \ eelf32iq2000.o \ @@ -727,6 +728,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \ $(srcdir)/emulparams/elf32frv.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32frvfd "$(tdir_frv)" +eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \ + $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32moxie "$(tdir_moxie)" eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32mcore "$(tdir_mcore)" diff --git a/ld/Makefile.in b/ld/Makefile.in index b9a9ccdc01e..ae084a5f137 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -441,6 +441,7 @@ ALL_EMULATIONS = \ eelf32elmipvxworks.o \ eelf32fr30.o \ eelf32frv.o \ + eelf32moxie.o \ eelf32i370.o \ eelf32ip2k.o \ eelf32iq2000.o \ @@ -1574,6 +1575,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \ $(srcdir)/emulparams/elf32frv.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32frvfd "$(tdir_frv)" +eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \ + $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32moxie "$(tdir_moxie)" eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32mcore "$(tdir_mcore)" diff --git a/ld/configure.tgt b/ld/configure.tgt index 329399f07e7..ebe3f236ff6 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -152,6 +152,8 @@ fr30-*-*) targ_emul=elf32fr30 frv-*-*linux*) targ_emul=elf32frvfd ;; frv-*-*) targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd" ;; +moxie-*-*) targ_emul=elf32moxie + ;; h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*) targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn h8300sx h8300sxn" ;; h8300-*-elf* | h8300-*-rtems*) diff --git a/ld/emulparams/elf32moxie.sh b/ld/emulparams/elf32moxie.sh new file mode 100644 index 00000000000..2ed270850c2 --- /dev/null +++ b/ld/emulparams/elf32moxie.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=elf +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-moxie" +TEXT_START_ADDR=0x1000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=moxie +STACK_ADDR=0x200000 diff --git a/ld/scripttempl/moxie.sc b/ld/scripttempl/moxie.sc new file mode 100644 index 00000000000..f7d788ff658 --- /dev/null +++ b/ld/scripttempl/moxie.sc @@ -0,0 +1,52 @@ +TORS=".tors : + { + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ; + } > ram" + +cat < ram} + ${CONSTRUCTING+${TORS}} + .data : + { + *(.data) + ${RELOCATING+ _edata = . ; } + } ${RELOCATING+ > ram} + .bss : + { + ${RELOCATING+ _bss_start = . ; } + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } + } ${RELOCATING+ > ram} + .stack ${RELOCATING+ 0x30000 } : + { + ${RELOCATING+ _stack = . ; } + *(.stack) + } ${RELOCATING+ > ram} + .stab 0 ${RELOCATING+(NOLOAD)} : + { + *(.stab) + } + .stabstr 0 ${RELOCATING+(NOLOAD)} : + { + *(.stabstr) + } +} +EOF -- cgit v1.2.1