diff options
author | Nick Clifton <nickc@redhat.com> | 2004-03-30 14:04:32 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-03-30 14:04:32 +0000 |
commit | 0949843db222949909c1cc15724459445105ea1b (patch) | |
tree | 67f494d7588ecdf38c9a0c3c385d6e0c5ec23804 /ld | |
parent | baaff79e16566902d0e30816bc3fe6b6fb12c323 (diff) | |
download | gdb-0949843db222949909c1cc15724459445105ea1b.zip gdb-0949843db222949909c1cc15724459445105ea1b.tar.gz gdb-0949843db222949909c1cc15724459445105ea1b.tar.bz2 |
Add (linker) support for CR16C processor
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 10 | ||||
-rw-r--r-- | ld/Makefile.am | 5 | ||||
-rw-r--r-- | ld/Makefile.in | 5 | ||||
-rw-r--r-- | ld/NEWS | 2 | ||||
-rw-r--r-- | ld/configure.tgt | 1 | ||||
-rw-r--r-- | ld/emulparams/elf32cr16c.sh | 5 | ||||
-rw-r--r-- | ld/scripttempl/elf32cr16c.sc | 52 |
7 files changed, 80 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index d46845d..8943f11 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2004-03-30 Galit Heller <Galit.Heller@nsc.com> + + * Makefile.am (ALL_EMULATIONS): Add eelf32cr16c.o. + (eelf32cr16c.c): New target. + * Makefile.in: Regenerate. + * configure.tgt: Handle cr16c-*-elf*. + * emulparams/elf32cr16c.sh: New file. + * scripttempl/elfcr16c.sc: Likewise + * NEWS: Mention support for new target. + 2004-03-30 Nick Clifton <nickc@redhat.com> * po/sv.po: Updated Swedish translation. diff --git a/ld/Makefile.am b/ld/Makefile.am index 25b1cfb..656ded2 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -149,6 +149,7 @@ ALL_EMULATIONS = \ eelf32_i860.o \ eelf32_sparc.o \ eelf32b4300.o \ + eelf32cr16c.o \ eelf32bmip.o \ eelf32bmipn32.o \ eelf32btsmip.o \ @@ -629,6 +630,10 @@ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)" +eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \ + $(srcdir)/emultempl/elf32.em \ + $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)" eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \ $(srcdir)/emultempl/mipself.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index 5a91690..0075163 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -263,6 +263,7 @@ ALL_EMULATIONS = \ eelf32_i860.o \ eelf32_sparc.o \ eelf32b4300.o \ + eelf32cr16c.o \ eelf32bmip.o \ eelf32bmipn32.o \ eelf32btsmip.o \ @@ -1355,6 +1356,10 @@ eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/mipself.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)" +eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \ + $(srcdir)/emultempl/elf32.em \ + $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)" eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \ $(srcdir)/emultempl/mipself.em \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} @@ -1,5 +1,7 @@ -*- text -*- +* cr16c support added by NSC. + * m32r Linux (ELF) support added by Renesas. * Improved linker's handling of unresolved symbols. The switch diff --git a/ld/configure.tgt b/ld/configure.tgt index 2c85431..2c3bc48 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -26,6 +26,7 @@ arm-*-pe) targ_emul=armpe ; arc-*-elf*) targ_emul=arcelf ;; avr-*-*) targ_emul=avr2 targ_extra_emuls="avr1 avr3 avr4 avr5" ;; +cr16c-*-elf*) targ_emul=elf32cr16c ;; cris-*-*aout*) targ_emul=crisaout targ_extra_emuls="criself crislinux" targ_extra_libpath=$targ_extra_emuls ;; diff --git a/ld/emulparams/elf32cr16c.sh b/ld/emulparams/elf32cr16c.sh new file mode 100644 index 0000000..e78e5ed --- /dev/null +++ b/ld/emulparams/elf32cr16c.sh @@ -0,0 +1,5 @@ +SCRIPT_NAME=elf32cr16c +TEMPLATE_NAME=elf32 +OUTPUT_FORMAT="elf32-cr16c" +ARCH=cr16c +ENTRY=_start diff --git a/ld/scripttempl/elf32cr16c.sc b/ld/scripttempl/elf32cr16c.sc new file mode 100644 index 0000000..b02edfd --- /dev/null +++ b/ld/scripttempl/elf32cr16c.sc @@ -0,0 +1,52 @@ +# Linker Script for National Semiconductor's CR16C-ELF32. + +test -z "$ENTRY" && ENTRY=_start +cat <<EOF + +/* Example Linker Script for linking NS CR16C or CR16CPlus + elf32 files, which were compiled with either the near data + model or the default data model. */ + +/* Force the entry point to be entered in the output file as + an undefined symbol. This is needed in case the entry point + (which is not called explicitly) is in an archive (which is + the usual case). */ + +EXTERN(${ENTRY}) + +ENTRY(${ENTRY}) + +MEMORY +{ + near_rom : ORIGIN = 0x4, LENGTH = 512K - 4 + near_ram : ORIGIN = 512K, LENGTH = 512K - 64K + rom : ORIGIN = 1M, LENGTH = 3M + ram : ORIGIN = 4M, LENGTH = 10M +} + +SECTIONS +{ +/* The heap is located in near memory, to suit both the near and + default data models. The heap and stack are aligned to the bus + width, as a speed optimization for accessing data located + there. The alignment to 4 bytes is compatible for both the CR16C + bus width (2 bytes) and CR16CPlus bus width (4 bytes). */ + + .text : { __TEXT_START = .; *(.text) __TEXT_END = .; } > rom + .rdata : { __RDATA_START = .; *(.rdata_4) *(.rdata_2) *(.rdata_1) __RDATA_END = .; } > near_rom + .ctor ALIGN(4) : { __CTOR_LIST = .; *(.ctors) __CTOR_END = .; } > near_rom + .dtor ALIGN(4) : { __DTOR_LIST = .; *(.dtors) __DTOR_END = .; } > near_rom + .data : { __DATA_START = .; *(.data_4) *(.data_2) *(.data_1) *(.data) __DATA_END = .; } > ram AT > rom + .bss (NOLOAD) : { __BSS_START = .; *(.bss_4) *(.bss_2) *(.bss_1) *(.bss) *(COMMON) __BSS_END = .; } > ram + .nrdata : { __NRDATA_START = .; *(.nrdat_4) *(.nrdat_2) *(.nrdat_1) __NRDATA_END = .; } > near_rom + .ndata : { __NDATA_START = .; *(.ndata_4) *(.ndata_2) *(.ndata_1) __NDATA_END = .; } > near_ram AT > rom + .nbss (NOLOAD) : { __NBSS_START = .; *(.nbss_4) *(.nbss_2) *(.nbss_1) *(.ncommon) __NBSS_END = .; } > near_ram + .heap : { . = ALIGN(4); __HEAP_START = .; . += 0x2000; __HEAP_MAX = .; } > near_ram + .stack : { . = ALIGN(4); . += 0x6000; __STACK_START = .; } > ram + .istack : { . = ALIGN(2); . += 0x100; __ISTACK_START = .; } > ram +} + +__DATA_IMAGE_START = LOADADDR(.data); +__NDATA_IMAGE_START = LOADADDR(.ndata); + +EOF |