diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 9 | ||||
-rw-r--r-- | ld/Makefile.am | 5 | ||||
-rw-r--r-- | ld/Makefile.in | 6 | ||||
-rw-r--r-- | ld/NEWS | 2 | ||||
-rw-r--r-- | ld/configure.tgt | 1 | ||||
-rw-r--r-- | ld/emulparams/elf32rx.sh | 32 | ||||
-rw-r--r-- | ld/emultempl/rxelf.em | 64 |
7 files changed, 119 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 6658a7d..a35039b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2009-09-29 DJ Delorie <dj@redhat.com> + + * Makefile.am: Add rules to build RX emulation. + * configure.tgt: Likewise. + * NEWS: Mention support for RX architecture. + * Makefile.in: Regenerate. + * emulparams/elf32rx.sh: New file. + * emultempl/rxelf.em: New file. + 2009-09-29 Alan Modra <amodra@bigpond.net.au> * ldlang.c (lang_size_sections_1): Allow scripts to specify a diff --git a/ld/Makefile.am b/ld/Makefile.am index 7c4444b..5feebf3 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -209,6 +209,7 @@ ALL_EMULATIONS = \ eelf32ppcsim.o \ eelf32ppcwindiss.o \ eelf32ppcvxworks.o \ + eelf32rx.o \ eelf32vax.o \ eelf32xc16x.o \ eelf32xc16xl.o \ @@ -787,6 +788,10 @@ eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \ eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)" +eelf32rx.c: $(srcdir)/emulparams/elf32rx.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32rx "$(tdir_elf32rx)" + @true end-sanitize-rx eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)" diff --git a/ld/Makefile.in b/ld/Makefile.in index 8aabafb..cba31ee 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -495,6 +495,7 @@ ALL_EMULATIONS = \ eelf32ppcsim.o \ eelf32ppcwindiss.o \ eelf32ppcvxworks.o \ + eelf32rx.o \ eelf32vax.o \ eelf32xc16x.o \ eelf32xc16xl.o \ @@ -1007,6 +1008,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcsim.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcvxworks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppcwindiss.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32rx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32vax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xc16x.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32xc16xl.Po@am__quote@ @@ -2128,6 +2130,10 @@ eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \ eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)" +eelf32rx.c: $(srcdir)/emulparams/elf32rx.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32rx "$(tdir_elf32rx)" + @true end-sanitize-rx eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)" @@ -1,5 +1,7 @@ -*- text -*- +* Add support for the Renesas RX processor. + Changes in 2.20: * GNU/Linux targets now support the STB_GNU_UNIQUE symbol binding. This is a diff --git a/ld/configure.tgt b/ld/configure.tgt index d6d86ab..5cced83 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -503,6 +503,7 @@ powerpc-*-lynxos*) targ_emul=ppclynx ;; rs6000-*-aix[5-9]*) targ_emul=aix5rs6 ;; rs6000-*-aix*) targ_emul=aixrs6 ;; +rx-*-*) targ_emul=elf32rx ;; s390x-*-linux*) targ_emul=elf64_s390 targ_extra_emuls=elf_s390 targ_extra_libpath=$targ_extra_emuls diff --git a/ld/emulparams/elf32rx.sh b/ld/emulparams/elf32rx.sh new file mode 100644 index 0000000..729b4b3 --- /dev/null +++ b/ld/emulparams/elf32rx.sh @@ -0,0 +1,32 @@ +MACHINE= +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-rx-le" +# See also `include/elf/rx.h' +TEXT_START_ADDR=0x10000000 +ARCH=rx +ENTRY=_start +EMBEDDED=yes +TEMPLATE_NAME=elf32 +EXTRA_EM_FILE=rxelf +# EXTRA_EM_FILE=needrelax +ELFSIZE=32 +MAXPAGESIZE=256 +# This is like setting STACK_ADDR to 0xbffffffc, except that the setting can +# be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra +# sentinal value at the bottom. +# N.B. We can't use PROVIDE to set the default value in a symbol because +# the address is needed to place the .stack section, which in turn is needed +# to hold the sentinel value(s). +test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELOCATING+(DEFINED(__stack) ? __stack : 0xbffffffc)} : + { + ${RELOCATING+__stack = .;} + *(.stack) + LONG(0xdeaddead) + }" +# We do not need .stack for shared library. +test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" + +OTHER_TEXT_SECTIONS='*(P)' +OTHER_READONLY_SECTIONS='C_1 : { *(C_1) } C_2 : { *(C_2) } C : { *(C) }' +OTHER_READWRITE_SECTIONS='D_1 : { *(D_1) } D_2 : { *(D_2) } D : { *(D) }' +OTHER_BSS_SECTIONS='B_1 : { *(B_1) } B_2 : { *(B_2) } B : { *(B) }' diff --git a/ld/emultempl/rxelf.em b/ld/emultempl/rxelf.em new file mode 100644 index 0000000..c4a2dac --- /dev/null +++ b/ld/emultempl/rxelf.em @@ -0,0 +1,64 @@ +# This shell script emits a C file. -*- C -*- +# Copyright 2009 Free Software Foundation, Inc. +# +# This file is part of the GNU Binutils. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +# MA 02110-1301, USA. +# + +# This file is sourced from elf32.em, and defines extra rx-elf +# specific routines. +# +test -z "$TARGET2_TYPE" && TARGET2_TYPE="rel" +fragment <<EOF + +static bfd_boolean no_flag_mismatch_warnings = FALSE; + +/* This is a convenient point to tell BFD about target specific flags. + After the output has been created, but before inputs are read. */ +static void +rx_elf_create_output_section_statements (void) +{ + extern void bfd_elf32_rx_set_target_flags (bfd_boolean); + + bfd_elf32_rx_set_target_flags (no_flag_mismatch_warnings); +} + +EOF + +# Define some shell vars to insert bits of code into the standard elf +# parse_args and list_options functions. +# +PARSE_AND_LIST_PROLOGUE=' +#define OPTION_NO_FLAG_MISMATCH_WARNINGS 301 +' + +PARSE_AND_LIST_LONGOPTS=' + { "no-flag-mismatch-warnings", no_argument, NULL, OPTION_NO_FLAG_MISMATCH_WARNINGS}, +' + +PARSE_AND_LIST_OPTIONS=' + fprintf (file, _(" --no-flag-mismatch-warnings Don'\''t warn about objects with incompatible" + " endian or dsp settings\n")); +' + +PARSE_AND_LIST_ARGS_CASES=' + case OPTION_NO_FLAG_MISMATCH_WARNINGS: + no_flag_mismatch_warnings = TRUE; + break; +' + +LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=rx_elf_create_output_section_statements |