binutils: backport a fix for broken relocation entries on mips with -fPIE, fixes...
authorFelix Fietkau <nbd@openwrt.org>
Fri, 28 Jan 2011 02:29:01 +0000 (02:29 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 28 Jan 2011 02:29:01 +0000 (02:29 +0000)
SVN-Revision: 25188

toolchain/binutils/patches/2.20.1/310-backport_fPIE_mips_fix.patch [new file with mode: 0644]

diff --git a/toolchain/binutils/patches/2.20.1/310-backport_fPIE_mips_fix.patch b/toolchain/binutils/patches/2.20.1/310-backport_fPIE_mips_fix.patch
new file mode 100644 (file)
index 0000000..3a5dc66
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/bfd/elfxx-mips.c
++++ b/bfd/elfxx-mips.c
+@@ -5696,9 +5696,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))