tag 526961 + patch
thanks

Hi,

Please find below a patch to fix the problem. It has been proposed in
upstream bugzilla, but not yet merged. I have tested it, and it fixes
the problem without introducing regressions to the testsuite.

Cheers,
Aurelien


diff -u binutils-2.20/debian/patches/00list binutils-2.20/debian/patches/00list
--- binutils-2.20/debian/patches/00list
+++ binutils-2.20/debian/patches/00list
@@ -6,9 +6,9 @@
 012_check_ldrunpath_length
 013_bash_in_ld_testsuite
+020_pie_mips.dpatch
 
 127_x86_64_i386_biarch
 128_build_id
 129_dir_section
-130_disable_pie_on_mips
 130_gold_disable_testsuite_build
 131_ld_bootstrap_testsuite
only in patch2:
unchanged:
--- binutils-2.20.orig/debian/patches/020_pie_mips.dpatch
+++ binutils-2.20/debian/patches/020_pie_mips.dpatch
@@ -0,0 +1,41 @@
+#!/bin/sh -e
+## 020_pie_mips.dpatch
+##
+## DP: Description: Fix -pie on mips/mipsel
+## DP: Author: Alan Modra <amo...@bigpond.net.au>
+## DP: Upstream status: in BTS, not yet merged
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as 
argument"
+                exit 1;;
+esac
+
+exit 0
+
+...@dpatch@
+--- a/bfd/elfxx-mips.c 18 Sep 2009 20:34:30 -0000      1.262
++++ b/bfd/elfxx-mips.c 4 Nov 2009 01:50:24 -0000
+@@ -5688,9 +5688,9 @@ mips_elf_create_dynamic_relocation (bfd 
+ 
+   /* We must now calculate the dynamic symbol table index to use
+      in the relocation.  */
+-  if (h != NULL
+-      && (!h->root.def_regular
+-        || (info->shared && !info->symbolic && !h->root.forced_local)))
++  if (!(h == NULL
++      || (h->root.def_regular
++          && (info->executable || info->symbolic || h->root.forced_local))))
+     {
+       indx = h->root.dynindx;
+       if (SGI_COMPAT (output_bfd))

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurel...@aurel32.net                 http://www.aurel32.net



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to