[arch-commits] Commit in binutils/trunk (PKGBUILD binutils-2.24-static-pie-hang.patch)
Allan McRae
allan at nymeria.archlinux.org
Fri May 16 11:03:04 UTC 2014
Date: Friday, May 16, 2014 @ 13:03:03
Author: allan
Revision: 212881
upgpkg: binutils 2.24-4
fix autoconf hangs with -static -fPIE -pie
Added:
binutils/trunk/binutils-2.24-static-pie-hang.patch
Modified:
binutils/trunk/PKGBUILD
-------------------------------------+
PKGBUILD | 11 +++-
binutils-2.24-static-pie-hang.patch | 78 ++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-05-16 10:08:08 UTC (rev 212880)
+++ PKGBUILD 2014-05-16 11:03:03 UTC (rev 212881)
@@ -5,7 +5,7 @@
pkgname=binutils
pkgver=2.24
-pkgrel=3
+pkgrel=4
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/binutils/"
@@ -18,10 +18,12 @@
options=('staticlibs' '!distcc' '!ccache')
install=binutils.install
source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2{,.sig}
- binutils-2.24-lto-testsuite.patch)
+ binutils-2.24-lto-testsuite.patch
+ binutils-2.24-static-pie-hang.patch)
md5sums=('e0f71a7b2ddab0f8612336ac81d9636b'
'SKIP'
- 'b16e895c24ff80acd98a21021eccefad')
+ 'b16e895c24ff80acd98a21021eccefad'
+ '4d2cf591560c3d25265778146bbe1941')
prepare() {
cd ${srcdir}/binutils-${pkgver}
@@ -32,6 +34,9 @@
# fix lto testsuite with gcc-4.9 - commit b35d44f1
patch -p1 -i $srcdir/binutils-2.24-lto-testsuite.patch
+ # fix autoconf hang with -static -fPIE -pie - commits d1ec1e40 and 818d220a
+ patch -p1 -i $srcdir/binutils-2.24-static-pie-hang.patch
+
mkdir ${srcdir}/binutils-build
}
Added: binutils-2.24-static-pie-hang.patch
===================================================================
--- binutils-2.24-static-pie-hang.patch (rev 0)
+++ binutils-2.24-static-pie-hang.patch 2014-05-16 11:03:03 UTC (rev 212881)
@@ -0,0 +1,78 @@
+diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
+index 4d391e1..d7f59e5 100644
+--- a/bfd/elf32-i386.c
++++ b/bfd/elf32-i386.c
+@@ -2368,8 +2368,13 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+ {
+- p->count -= p->pc_count;
+- p->pc_count = 0;
++ /* Don't update reloc count if there are any non
++ pc-relative relocs. */
++ if (!h->pointer_equality_needed)
++ {
++ p->count -= p->pc_count;
++ p->pc_count = 0;
++ }
+ if (p->count == 0)
+ *pp = p->next;
+ else
+diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
+index edee8ec..999011b 100644
+--- a/bfd/elf64-x86-64.c
++++ b/bfd/elf64-x86-64.c
+@@ -2463,8 +2463,13 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+ {
+- p->count -= p->pc_count;
+- p->pc_count = 0;
++ /* Don't update reloc count if there are any non
++ pc-relative relocs. */
++ if (!h->pointer_equality_needed)
++ {
++ p->count -= p->pc_count;
++ p->pc_count = 0;
++ }
+ if (p->count == 0)
+ *pp = p->next;
+ else
+diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
+index 4d391e1..e834a5a 100644
+--- a/bfd/elf32-i386.c
++++ b/bfd/elf32-i386.c
+@@ -2390,9 +2390,12 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
+ }
+
+ /* Also discard relocs on undefined weak syms with non-default
+- visibility. */
++ visibility. Don't discard relocs against __ehdr_start which
++ will be defined by assign_file_positions_for_non_load_sections
++ later. */
+ if (eh->dyn_relocs != NULL
+- && h->root.type == bfd_link_hash_undefweak)
++ && h->root.type == bfd_link_hash_undefweak
++ && strcmp (h->root.root.string, "__ehdr_start") != 0)
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
+diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
+index edee8ec..f364fe4 100644
+--- a/bfd/elf64-x86-64.c
++++ b/bfd/elf64-x86-64.c
+@@ -2473,9 +2473,12 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
+ }
+
+ /* Also discard relocs on undefined weak syms with non-default
+- visibility. */
++ visibility. Don't discard relocs against __ehdr_start which
++ will be defined by assign_file_positions_for_non_load_sections
++ later. */
+ if (eh->dyn_relocs != NULL
+- && h->root.type == bfd_link_hash_undefweak)
++ && h->root.type == bfd_link_hash_undefweak
++ && strcmp (h->root.root.string, "__ehdr_start") != 0)
+ {
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ eh->dyn_relocs = NULL;
More information about the arch-commits
mailing list