aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2018-11-07 17:16:56 +0900
committerYoshinori Sato <ysato@users.sourceforge.jp>2018-11-07 17:18:05 +0900
commit8d3c78e473c2af54c8117808f2459a408f9f6327 (patch)
treea357bad217bc2fa52efc23af3fc5b23ac139df26 /bfd
parent8f531a8d1f9b9b9061368ddd89d1b7e7aafe9e38 (diff)
downloadbinutils-8d3c78e473c2af54c8117808f2459a408f9f6327.zip
binutils-8d3c78e473c2af54c8117808f2459a408f9f6327.tar.gz
binutils-8d3c78e473c2af54c8117808f2459a408f9f6327.tar.bz2
rx: Add target rx-*-linux.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/config.bfd4
-rw-r--r--bfd/configure.ac1
-rw-r--r--bfd/elf32-rx.c23
-rw-r--r--bfd/targets.c1
5 files changed, 38 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 155251d..babfe1b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2018-11-07 Yoshinori Sato <ysato@users.sourceforge.jp>
+
+ * config.bfd: Add rx-*-linux.
+ * congigure.ac: Likewise.
+ * elf32-rx.c (rx_linux_object_p): New function.
+ (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME)
+ (elf_backend_object_p, elf32_bed): Define rx-*-linux.
+ * targets.c: Add rx_elf32_linux_le_vec.
+
2018-11-06 Romain Margheriti <lilrom13@gmail.com>
PR 23742
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 5d8424a..2bde98a 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1202,6 +1202,10 @@ case "${targ}" in
targ_selvecs="rx_elf32_be_vec rx_elf32_le_vec rx_elf32_be_ns_vec"
targ_underscore=yes
;;
+ rx-*-linux*)
+ targ_defvec=rx_elf32_linux_le_vec
+ targ_selvecs="rx_elf32_linux_le_vec"
+ ;;
s390-*-linux*)
targ_defvec=s390_elf32_vec
diff --git a/bfd/configure.ac b/bfd/configure.ac
index 270e54e..5942a74 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -612,6 +612,7 @@ do
rx_elf32_be_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
rx_elf32_be_ns_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
rx_elf32_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
+ rx_elf32_linux_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;;
s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo $elf"; want64=true; target_size=64 ;;
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index 1f70b97..ddcf5e9 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -3310,6 +3310,14 @@ rx_elf_object_p (bfd * abfd)
return TRUE;
}
+
+static bfd_boolean
+rx_linux_object_p (bfd * abfd)
+{
+ bfd_default_set_arch_mach (abfd, bfd_arch_rx,
+ elf32_rx_machine (abfd));
+ return TRUE;
+}
#ifdef DEBUG
@@ -4059,3 +4067,18 @@ rx_additional_link_map_text (bfd *obfd, struct bfd_link_info *info, FILE *mapfil
#define elf32_bed elf32_rx_be_ns_bed
#include "elf32-target.h"
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM rx_elf32_linux_le_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-rx-linux"
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#undef elf_backend_object_p
+#define elf_backend_object_p rx_linux_object_p
+#undef elf_symbol_leading_char
+#undef elf32_bed
+#define elf32_bed elf32_rx_le_linux_bed
+
+#include "elf32-target.h"
diff --git a/bfd/targets.c b/bfd/targets.c
index b59dd76..dc4bef1 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -777,6 +777,7 @@ extern const bfd_target rs6000_xcoff_vec;
extern const bfd_target rx_elf32_be_vec;
extern const bfd_target rx_elf32_be_ns_vec;
extern const bfd_target rx_elf32_le_vec;
+extern const bfd_target rx_elf32_linux_le_vec;
extern const bfd_target s390_elf32_vec;
extern const bfd_target s390_elf64_vec;
extern const bfd_target score_elf32_be_vec;