minix/external/gpl3/binutils/patches/0001-minix.patch
Lionel Sambuc c9ea9e7af8 Binutils: Synchronization & Gold activation
Change-Id: I5235984746178ee30b5db18e7def0016d9a0e36f
2014-07-28 17:05:11 +02:00

249 lines
10 KiB
Diff

diff -rNU3 dist.nbsd/bfd/config.bfd dist/bfd/config.bfd
--- dist.nbsd/bfd/config.bfd 2014-02-17 14:34:49.407022105 +0100
+++ dist/bfd/config.bfd 2014-02-17 16:13:26.634958919 +0100
@@ -316,7 +316,7 @@
;;
arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \
- arm*-*-eabi* )
+ arm*-*-eabi* | arm*-*-minix*)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
@@ -711,6 +711,9 @@
i[3-7]86-none-*)
targ_defvec=i386coff_vec
;;
+ i[3-7]86-*-minix)
+ targ_defvec=bfd_elf32_i386_minix_vec
+ ;;
i[3-7]86-*-aout* | i[3-7]86*-*-vsta*)
targ_defvec=i386aout_vec
;;
diff -rNU3 dist.nbsd/bfd/configure dist/bfd/configure
--- dist.nbsd/bfd/configure 2014-02-17 14:34:49.413688892 +0100
+++ dist/bfd/configure 2014-02-17 16:13:26.638292303 +0100
@@ -15232,6 +15232,7 @@
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_minix_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
diff -rNU3 dist.nbsd/bfd/configure.in dist/bfd/configure.in
--- dist.nbsd/bfd/configure.in 2014-02-17 14:34:49.393688529 +0100
+++ dist/bfd/configure.in 2014-02-17 16:13:26.638292303 +0100
@@ -724,6 +724,7 @@
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_sol2_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_i386_minix_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_nacl_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_vxworks_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
diff -rNU3 dist.nbsd/bfd/elf32-i386.c dist/bfd/elf32-i386.c
--- dist.nbsd/bfd/elf32-i386.c 2014-02-17 14:34:49.393688529 +0100
+++ dist/bfd/elf32-i386.c 2014-02-17 16:13:26.644959071 +0100
@@ -4979,6 +4979,18 @@
#include "elf32-target.h"
+/* MINIX3 support. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf32_i386_minix_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf32-i386-minix"
+
+#undef elf32_bed
+#define elf32_bed elf32_i386_minix_bed
+
+#include "elf32-target.h"
+
/* FreeBSD support. */
#undef TARGET_LITTLE_SYM
diff -rNU3 dist.nbsd/bfd/targets.c dist/bfd/targets.c
--- dist.nbsd/bfd/targets.c 2014-02-17 14:34:49.417022286 +0100
+++ dist/bfd/targets.c 2014-02-17 16:13:26.644959071 +0100
@@ -624,6 +624,7 @@
extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
extern const bfd_target bfd_elf32_i386_freebsd_vec;
+extern const bfd_target bfd_elf32_i386_minix_vec;
extern const bfd_target bfd_elf32_i386_nacl_vec;
extern const bfd_target bfd_elf32_i386_sol2_vec;
extern const bfd_target bfd_elf32_i386_vxworks_vec;
diff -rNU3 dist.nbsd/config.guess dist/config.guess
--- dist.nbsd/config.guess 2014-02-17 14:34:49.417022286 +0100
+++ dist/config.guess 2014-02-17 16:13:26.644959071 +0100
@@ -872,8 +872,8 @@
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
+ *:Minix:*:*)
+ echo ${UNAME_MACHINE}-elf32-minix
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
diff -rNU3 dist.nbsd/configure dist/configure
--- dist.nbsd/configure 2014-02-17 14:34:49.430355862 +0100
+++ dist/configure 2014-02-17 16:13:26.648292455 +0100
@@ -2869,7 +2869,7 @@
*-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
| *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
| *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \
- | *-*-solaris2* | *-*-nto* | *-*-nacl*)
+ | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-minix*)
case "${target}" in
*-*-linux*aout* | *-*-linux*oldld*)
;;
diff -rNU3 dist.nbsd/gas/config/tc-i386.h dist/gas/config/tc-i386.h
--- dist.nbsd/gas/config/tc-i386.h 2014-02-17 14:34:48.917013206 +0100
+++ dist/gas/config/tc-i386.h 2014-02-17 16:13:26.648292455 +0100
@@ -72,6 +72,10 @@
#define ELF_TARGET_FORMAT64 "elf64-x86-64-sol2"
#endif
+#ifdef TE_MINIX
+#define ELF_TARGET_FORMAT "elf32-i386-minix"
+#endif
+
#ifndef ELF_TARGET_FORMAT
#define ELF_TARGET_FORMAT "elf32-i386"
#endif
diff -rNU3 dist.nbsd/gas/config/te-minix.h dist/gas/config/te-minix.h
--- dist.nbsd/gas/config/te-minix.h 1970-01-01 01:00:00.000000000 +0100
+++ dist/gas/config/te-minix.h 2014-02-17 16:13:26.648292455 +0100
@@ -0,0 +1,9 @@
+#define TE_MINIX 1
+
+/* Added these, because if we don't know what we're targeting we may
+ need an assembler version of libgcc, and that will use local
+ labels. */
+#define LOCAL_LABELS_DOLLAR 1
+#define LOCAL_LABELS_FB 1
+
+#include "obj-format.h"
diff -rNU3 dist.nbsd/gas/configure dist/gas/configure
--- dist.nbsd/gas/configure 2014-02-17 14:34:48.930346782 +0100
+++ dist/gas/configure 2014-02-17 16:13:26.651625840 +0100
@@ -6127,6 +6127,10 @@
fi
;;
+minix*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
gnu*)
lt_cv_deplibs_check_method=pass_all
;;
diff -rNU3 dist.nbsd/gas/configure.tgt dist/gas/configure.tgt
--- dist.nbsd/gas/configure.tgt 2014-02-17 14:34:48.930346782 +0100
+++ dist/gas/configure.tgt 2014-02-17 16:13:26.651625840 +0100
@@ -448,6 +448,8 @@
*-*-elf | *-*-sysv4*) fmt=elf ;;
*-*-solaris*) fmt=elf em=solaris ;;
*-*-aros*) fmt=elf em=linux ;;
+ i*-*-minix*) fmt=elf em=minix ;;
+ arm*-*-minix*) fmt=elf em=armeabi ;;
*-*-vxworks* | *-*-windiss) fmt=elf em=vxworks ;;
*-*-netware) fmt=elf em=netware ;;
esac
diff -rNU3 dist.nbsd/ld/configure.tgt dist/ld/configure.tgt
--- dist.nbsd/ld/configure.tgt 2014-02-17 14:34:49.170351140 +0100
+++ dist/ld/configure.tgt 2014-02-17 16:13:26.651625840 +0100
@@ -82,6 +82,8 @@
armeb-*-elf) targ_emul=armelfb ;;
arm-*-elf | arm*-*-eabi*)
targ_emul=armelf ;;
+arm*-*-minix*) targ_emul=armelf_minix
+ targ_extra_emuls="armelf" ;;
arm*-*-symbianelf*) targ_emul=armsymbian;;
arm-*-kaos*) targ_emul=armelf ;;
arm9e-*-elf) targ_emul=armelf ;;
@@ -208,6 +210,8 @@
i[3-7]86-*-bsd386) targ_emul=i386bsd ;;
i[3-7]86-*-bsdi*) targ_emul=i386bsd ;;
i[3-7]86-*-aout) targ_emul=i386aout ;;
+i[3-7]86-*-minix) targ_emul=elf_i386_minix
+ targ_extra_emuls="elf_i386" ;;
i[3-7]86-*-linux*aout*) targ_emul=i386linux
targ_extra_emuls=elf_i386
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` ;;
diff -rNU3 dist.nbsd/ld/emulparams/armelf_minix.sh dist/ld/emulparams/armelf_minix.sh
--- dist.nbsd/ld/emulparams/armelf_minix.sh 1970-01-01 01:00:00.000000000 +0100
+++ dist/ld/emulparams/armelf_minix.sh 2014-02-17 16:13:26.651625840 +0100
@@ -0,0 +1,15 @@
+. ${srcdir}/emulparams/armelf.sh
+. ${srcdir}/emulparams/elf_minix.sh
+OUTPUT_FORMAT="elf32-littlearm"
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+
+DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
+
+# Dynamic libraries support
+GENERATE_SHLIB_SCRIPT=yes
+TARGET2_TYPE=got-rel
+
+GENERATE_PIE_SCRIPT=yes
+
+unset EMBEDDED
diff -rNU3 dist.nbsd/ld/emulparams/elf_i386_minix.sh dist/ld/emulparams/elf_i386_minix.sh
--- dist.nbsd/ld/emulparams/elf_i386_minix.sh 1970-01-01 01:00:00.000000000 +0100
+++ dist/ld/emulparams/elf_i386_minix.sh 2014-02-17 16:13:26.651625840 +0100
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf_i386.sh
+. ${srcdir}/emulparams/elf_minix.sh
+OUTPUT_FORMAT="elf32-i386-minix"
diff -rNU3 dist.nbsd/ld/emulparams/elf_minix.sh dist/ld/emulparams/elf_minix.sh
--- dist.nbsd/ld/emulparams/elf_minix.sh 1970-01-01 01:00:00.000000000 +0100
+++ dist/ld/emulparams/elf_minix.sh 2014-02-17 16:13:26.651625840 +0100
@@ -0,0 +1 @@
+ELF_INTERPRETER_NAME=\"/libexec/ld-elf.so.1\"
diff -rNU3 dist.nbsd/ld/Makefile.in dist/ld/Makefile.in
--- dist.nbsd/ld/Makefile.in 2014-02-17 14:34:49.163684353 +0100
+++ dist/ld/Makefile.in 2014-02-17 16:13:26.651625840 +0100
@@ -450,6 +450,7 @@
earmelf_fbsd.c \
earmelf_linux.c \
earmelf_linux_eabi.c \
+ earmelf_minix.c \
earmelf_nacl.c \
earmelf_nbsd.c \
earmelf_nbsd_eabi.c \
@@ -574,6 +575,7 @@
eelf_i386_chaos.c \
eelf_i386_fbsd.c \
eelf_i386_ldso.c \
+ eelf_i386_minix.c \
eelf_i386_nacl.c \
eelf_i386_sol2.c \
eelf_i386_vxworks.c \
@@ -2195,6 +2197,10 @@
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
+earmelf_minix.c: $(srcdir)/emulparams/armelf_minix.sh \
+ $(srcdir)/emulparams/armelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_minix "$(tdir_armelf_minix)"
earmelf_nacl.c: $(srcdir)/emulparams/armelf_nacl.sh \
$(srcdir)/emulparams/armelf_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux.sh \
@@ -2715,6 +2721,10 @@
eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_i386_minix.c: $(srcdir)/emulparams/elf_i386_minix.sh \
+ $(srcdir)/emulparams/elf_i386.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_minix "$(tdir_elf_i386_minix)"
eelf_i386_nacl.c: $(srcdir)/emulparams/elf_i386_nacl.sh \
$(srcdir)/emulparams/elf_i386.sh \
$(srcdir)/emulparams/elf_nacl.sh \