summaryrefslogtreecommitdiffstats
path: root/toolchain/binutils/2.16/300-120_mips_xgot_multigot_workaround.patch
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-04-28 03:53:52 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-04-28 03:53:52 +0000
commit8a5d57bbb2aacabb29f6ac031cc4263a0f5404cf (patch)
treefe8e5e5d7cad96f6b7a0d39a331fbb326a1c7e67 /toolchain/binutils/2.16/300-120_mips_xgot_multigot_workaround.patch
parent719bb81a16ea34600664900b2d3fc63df5cc10d0 (diff)
downloadbuildroot-novena-8a5d57bbb2aacabb29f6ac031cc4263a0f5404cf.tar.gz
buildroot-novena-8a5d57bbb2aacabb29f6ac031cc4263a0f5404cf.zip
Add support for soon to be released binutils-2.16 as well as
GCC-4.1.0. These tool versions are needed so that NPTL support can be added into uClibc. Backporting NPTL from GCC-4.1.0 into GCC-4.0 may be possible, but not recommended.
Diffstat (limited to 'toolchain/binutils/2.16/300-120_mips_xgot_multigot_workaround.patch')
-rw-r--r--toolchain/binutils/2.16/300-120_mips_xgot_multigot_workaround.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/toolchain/binutils/2.16/300-120_mips_xgot_multigot_workaround.patch b/toolchain/binutils/2.16/300-120_mips_xgot_multigot_workaround.patch
new file mode 100644
index 000000000..036712eac
--- /dev/null
+++ b/toolchain/binutils/2.16/300-120_mips_xgot_multigot_workaround.patch
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+## 120_mips_xgot_multigot_workaround.dpatch
+##
+## DP: Description: Make multigot/xgot handling mutually exclusive.
+## DP: Author: Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+## DP: Upstream status: Not submitted
+## DP: Date: 2004-09-17
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c binutils-2.15/bfd/elfxx-mips.c
+--- /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:41:37.156466673 +0100
++++ binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:42:15.998362861 +0100
+@@ -6594,7 +6594,9 @@
+
+ mips_elf_resolve_final_got_entries (g);
+
+- if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd))
++ if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd)
++ && g->global_gotno <= (MIPS_ELF_GOT_MAX_SIZE (output_bfd)
++ / MIPS_ELF_GOT_SIZE (output_bfd)))
+ {
+ if (! mips_elf_multi_got (output_bfd, info, g, s, local_gotno))
+ return FALSE;