toaruos/util/patches/binutils.patch

65 lines
2.2 KiB
Diff

diff --git a/bfd/config.bfd b/bfd/config.bfd
index b998830..3d6bdc4 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -661,6 +661,10 @@ case "${targ}" in
targ_defvec=i386_elf32_vec
targ_selvecs="iamcu_elf32_vec i386_nlm32_vec i386_coff_vec i386_aout_vec"
;;
+ i[3-7]86-*-toaru*)
+ targ_defvec=i386_elf32_vec
+ targ_selvecs=
+ ;;
i[3-7]86-*-linux*aout*)
targ_defvec=i386_aout_linux_vec
targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
diff --git a/config.sub b/config.sub
index 2377e13..19fa153 100755
--- a/config.sub
+++ b/config.sub
@@ -1375,6 +1375,7 @@ case $os in
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -toaru* \
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
diff --git a/gas/configure.tgt b/gas/configure.tgt
index e2df659..72a6bbf 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -283,6 +283,7 @@ case ${generic_target} in
i386-*-chaos) fmt=elf ;;
i386-*-rdos*) fmt=elf ;;
i386-*-darwin*) fmt=macho ;;
+ i386-*-toaru*) fmt=elf ;;
i860-*-*) fmt=elf endian=little ;;
diff --git a/ld/configure.tgt b/ld/configure.tgt
index a3db909..13c4387 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -269,6 +269,7 @@ 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-*-toaru*) targ_emul=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
diff --git a/ld/emulparams/elf_i386.sh b/ld/emulparams/elf_i386.sh
index b08e661..7bd4bd5 100644
--- a/ld/emulparams/elf_i386.sh
+++ b/ld/emulparams/elf_i386.sh
@@ -33,4 +33,8 @@ case "$target" in
;;
esac
;;
+ i[3-7]86*-toaru*)
+ TEXT_START_ADDR=0x40000000
+ ;;
esac
+