1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/binutils/2.19/100-ppc64-pie.patch Mon Mar 30 21:17:21 2009 +0000
1.3 @@ -0,0 +1,20 @@
1.4 +Original patch from Gentoo:
1.5 +gentoo/src/patchsets/binutils/2.19/03_all_binutils-2.15.92.0.2-ppc64-pie.patch
1.6 +
1.7 +diff -durN binutils-2.19.orig/bfd/elf64-ppc.c binutils-2.19/bfd/elf64-ppc.c
1.8 +--- binutils-2.19.orig/bfd/elf64-ppc.c 2008-10-09 14:18:24.000000000 +0200
1.9 ++++ binutils-2.19/bfd/elf64-ppc.c 2008-11-23 16:16:11.000000000 +0100
1.10 +@@ -11294,7 +11294,12 @@
1.11 + else if (!SYMBOL_REFERENCES_LOCAL (info, &h->elf)
1.12 + && !is_opd
1.13 + && r_type != R_PPC64_TOC)
1.14 +- outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
1.15 ++ {
1.16 ++ outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
1.17 ++ if (h->elf.dynindx == -1
1.18 ++ && h->elf.root.type == bfd_link_hash_undefweak)
1.19 ++ memset (&outrel, 0, sizeof outrel);
1.20 ++ }
1.21 + else
1.22 + {
1.23 + /* This symbol is local, or marked to become local,