aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-09-29 14:17:19 +0000
committerNick Clifton <nickc@redhat.com>2009-09-29 14:17:19 +0000
commitc7927a3c0ef1d97faf24f1df31baf419e2d92fa1 (patch)
tree1945b2f761590ba0f6c3930e7b0e7f1a0387dd33 /ld
parent8765b556928465dc61f7bc00061c2a411a015361 (diff)
downloadgdb-c7927a3c0ef1d97faf24f1df31baf419e2d92fa1.zip
gdb-c7927a3c0ef1d97faf24f1df31baf419e2d92fa1.tar.gz
gdb-c7927a3c0ef1d97faf24f1df31baf419e2d92fa1.tar.bz2
bfd
* Makefile.am (ALL_MACHINES): Add cpu-rx.lo. (ALL_MACHINES_CFILES): Add cpu-rx.c. (BFD32_BACKENDS): Add elf32-rx.lo. (BFD32_BACKENDS_CFILES): Add elf32-rx.c. * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx. Export bfd_rx_arch. (bfd_archures_list): Add bfd_rx_arch. * config.bfd: Add entry for rx-*-elf. * configure.in: Add entries for bfd_elf32_rx_le_vec and bfd_elf32_rx_be_vec. * reloc.c: Add RX relocations. * targets.c: Add RX target vectors. * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. * configure: Regenerate. * libbfd.h: Regenerate. * cpu-rx.c: New file. * elf32-rx.c: New file. binutils * readelf.c: Add support for RX target. * MAINTAINERS: Add DJ and NickC as maintainers for RX. gas * Makefile.am: Add RX target. * configure.in: Likewise. * configure.tgt: Likewise. * read.c (do_repeat_with_expander): New function. * read.h: Provide a prototype for do_repeat_with_expander. * doc/Makefile.am: Add RX target documentation. * doc/all.texi: Likewise. * doc/as.texinfo: Likewise. * Makefile.in: Regenerate. * NEWS: Mention support for RX architecture. * configure: Regenerate. * doc/Makefile.in: Regenerate. * config/rx-defs.h: New file. * config/rx-parse.y: New file. * config/tc-rx.h: New file. * config/tc-rx.c: New file. * doc/c-rx.texi: New file. gas/testsuite * gas/rx: New directory. * gas/rx/*: New set of test cases. * gas/elf/section2.e-rx: New expected output file. * gas/all/gas.exp: Add support for RX target. * gas/elf/elf.exp: Likewise. * gas/lns/lns.exp: Likewise. * gas/macros/macros.exp: Likewise. include * dis-asm.h: Add prototype for print_insn_rx. include/elf * rx.h: New file. include/opcode * rx.h: New file. ld * 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. opcodes * Makefile.am: Add RX files. * configure.in: Add support for RX target. * disassemble.c: Likewise. * Makefile.in: Regenerate. * configure: Regenerate. * opc2c.c: New file. * rx-decode.c: New file. * rx-decode.opc: New file. * rx-dis.c: New file.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/Makefile.am5
-rw-r--r--ld/Makefile.in6
-rw-r--r--ld/NEWS2
-rw-r--r--ld/configure.tgt1
-rw-r--r--ld/emulparams/elf32rx.sh32
-rw-r--r--ld/emultempl/rxelf.em64
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)"
diff --git a/ld/NEWS b/ld/NEWS
index 7b57a0c..86b74cf 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -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