This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Add support for Redox on i386 and x86_64
- From: Jeremy Soller <jackpot51 at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 23 Dec 2016 08:18:29 -0700
- Subject: Add support for Redox on i386 and x86_64
- Authentication-results: sourceware.org; auth=none
This set of changes will add support for the Redox OS target to GNU binutils.
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 98663fd..9c4972c 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -677,6 +677,11 @@ case "${targ}" in
targ_selvecs="iamcu_elf32_vec i386_aout_linux_vec i386_pei_vec"
targ64_selvecs="x86_64_elf64_vec x86_64_elf32_vec x86_64_pei_vec
l1om_elf64_vec k1om_elf64_vec"
;;
+ i[3-7]86-*-redox*)
+ targ_defvec=i386_elf32_vec
+ targ_selvecs=
+ targ64_selvecs=x86_64_elf64_vec
+ ;;
i[3-7]86-*-nacl*)
targ_defvec=i386_elf32_nacl_vec
targ_selvecs="arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
@@ -724,6 +729,11 @@ case "${targ}" in
targ_selvecs="i386_elf32_vec iamcu_elf32_vec x86_64_elf32_vec
i386_aout_linux_vec i386_pei_vec x86_64_pei_vec l1om_elf64_vec
k1om_elf64_vec"
want64=true
;;
+ x86_64-*-redox*)
+ targ_defvec=x86_64_elf64_vec
+ targ_selvecs=i386_elf32_vec
+ want64=true
+ ;;
x86_64-*-nacl*)
targ_defvec=x86_64_elf32_nacl_vec
targ_selvecs="i386_elf32_nacl_vec x86_64_elf64_nacl_vec
arm_elf32_nacl_be_vec arm_elf32_nacl_le_vec"
diff --git a/config.sub b/config.sub
index 2377e13..09a9302 100755
--- a/config.sub
+++ b/config.sub
@@ -1395,7 +1395,7 @@ case $os in
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -redox* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 3e230cb..db87c1e 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -247,6 +247,7 @@ case ${generic_target} in
case ${cpu}-${os} in
x86_64*-linux-gnux32) arch=x86_64:32 ;;
esac ;;
+ i386-*-redox*) fmt=elf ;;
i386-*-lynxos*) fmt=elf em=lynx ;;
i386-*-sysv[45]*) fmt=elf ;;
i386-*-solaris*) fmt=elf em=solaris ;;
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index d428dff..c30c82d 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -281,8 +281,8 @@ iq2000-*-*)
gdb_sim=../sim/iq2000/libsim.a
;;
-lm32-*-*)
- gdb_target_obs="lm32-tdep.o"
+lm32-*-*)
+ gdb_target_obs="lm32-tdep.o"
gdb_sim=../sim/lm32/libsim.a
;;
@@ -613,7 +613,7 @@ tic6x-*-*linux)
;;
tic6x-*-*)
- # Target: TI C6X
+ # Target: TI C6X
gdb_target_obs="tic6x-tdep.o"
;;
@@ -666,7 +666,7 @@ x86_64-*-dicos*)
gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
dicos-tdep.o i386-dicos-tdep.o amd64-dicos-tdep.o"
;;
-x86_64-*-elf* | x86_64-*-rtems*)
+x86_64-*-elf* | x86_64-*-rtems* | x86_64-*-redox*)
gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o i386bsd-tdep.o"
;;
x86_64-*-linux*)
diff --git a/ld/configure.tgt b/ld/configure.tgt
index c196e68..73b9f44 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -269,6 +269,10 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
+i[3-7]86-*-redox*) targ_emul=elf_i386
+ targ_extra_emuls=elf_x86_64 ;;
+x86_64-*-redox*) targ_emul=elf_x86_64
+ targ_extra_emuls=elf_i386 ;;
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386
targ_extra_emuls=elf_iamcu ;;
i[3-7]86-*-solaris2*) targ_emul=elf_i386_sol2