diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/Makefile.am | 4 | ||||
-rw-r--r-- | ld/Makefile.in | 5 | ||||
-rw-r--r-- | ld/configure.tgt | 2 | ||||
-rw-r--r-- | ld/emulparams/elf32ft32.sh | 8 | ||||
-rw-r--r-- | ld/scripttempl/ft32.sc | 62 |
6 files changed, 89 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index c61baaef365..4a16b50db15 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2015-01-28 James Bowman <james.bowman@ftdichip.com> + + * Makefile.am: Add FT32 files. + * configure.tgt: Handle FT32 target. + * emulparams/elf32ft32.sh: New file. + * scripttempl/ft32.sc: New file. + * Makefile.in: Regenerate. + 2015-01-28 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> PR 4643 diff --git a/ld/Makefile.am b/ld/Makefile.am index 68ff02f3481..18bcf8bd957 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -228,6 +228,7 @@ ALL_EMULATION_SOURCES = \ eelf32fr30.c \ eelf32frv.c \ eelf32frvfd.c \ + eelf32ft32.c \ eelf32i370.c \ eelf32ip2k.c \ eelf32iq10.c \ @@ -1053,6 +1054,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \ $(srcdir)/emulparams/elf32frv.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eelf32ft32.c: $(srcdir)/emulparams/elf32ft32.sh \ + $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index 311452d0532..a3011c9eb1f 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -536,6 +536,7 @@ ALL_EMULATION_SOURCES = \ eelf32fr30.c \ eelf32frv.c \ eelf32frvfd.c \ + eelf32ft32.c \ eelf32i370.c \ eelf32ip2k.c \ eelf32iq10.c \ @@ -1146,6 +1147,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32fr30.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32frv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32frvfd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ft32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32i370.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ip2k.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32iq10.Po@am__quote@ @@ -2495,6 +2497,9 @@ eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \ $(srcdir)/emulparams/elf32frv.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} +eelf32ft32.c: $(srcdir)/emulparams/elf32ft32.sh \ + $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS} diff --git a/ld/configure.tgt b/ld/configure.tgt index ef876b26c77..f16c845d169 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -744,6 +744,8 @@ tilegxbe-*-*) targ_emul=elf64tilegx_be targ_extra_emuls="elf64tilegx elf32tilegx elf32tilegx_be" targ_extra_libpath=$targ_extra_emuls ;; tilepro-*-*) targ_emul=elf32tilepro ;; +ft32-*-*) targ_emul=elf32ft32 + ;; v850*-*-*) targ_emul=v850_rh850 targ_extra_emuls=v850 ;; diff --git a/ld/emulparams/elf32ft32.sh b/ld/emulparams/elf32ft32.sh new file mode 100644 index 00000000000..4b74f9b99b8 --- /dev/null +++ b/ld/emulparams/elf32ft32.sh @@ -0,0 +1,8 @@ +SCRIPT_NAME=ft32 +TEMPLATE_NAME=generic +EXTRA_EM_FILE=genelf +OUTPUT_FORMAT="elf32-ft32" +TEXT_START_ADDR=0x0000 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +ARCH=ft32 +EMBEDDED=yes diff --git a/ld/scripttempl/ft32.sc b/ld/scripttempl/ft32.sc new file mode 100644 index 00000000000..8ceee44c6bf --- /dev/null +++ b/ld/scripttempl/ft32.sc @@ -0,0 +1,62 @@ +TORS=".tors : + { + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ; + . = ALIGN(4); + } > ram" + +cat <<EOF +OUTPUT_FORMAT("${OUTPUT_FORMAT}") +OUTPUT_ARCH(${ARCH}) +${LIB_SEARCH_DIRS} + +MEMORY +{ + flash (rx) : ORIGIN = 0, LENGTH = 256K + ram (rw!x) : ORIGIN = 0x800000, LENGTH = 64K +} +SECTIONS +{ + .text : + { + *(.text*) + *(.strings) + *(._pm*) + *(.init) + *(.fini) + ${RELOCATING+ _etext = . ; } + . = ALIGN(4); + } ${RELOCATING+ > flash} + ${CONSTRUCTING+${TORS}} + .data : AT (ADDR (.text) + SIZEOF (.text)) + { + *(.data) + *(.rodata) + *(.rodata*) + ${RELOCATING+ _edata = . ; } + } ${RELOCATING+ > ram} + .bss SIZEOF(.data) + ADDR(.data) : + { + ${RELOCATING+ _bss_start = . ; } + *(.bss) + *(COMMON) + ${RELOCATING+ _end = . ; } + } ${RELOCATING+ > ram} + + ${RELOCATING+ __data_load_start = LOADADDR(.data); } + ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); } + + .stab 0 ${RELOCATING+(NOLOAD)} : + { + *(.stab) + } + .stabstr 0 ${RELOCATING+(NOLOAD)} : + { + *(.stabstr) + } +} +EOF |