cross/binutils-*: update to 2.31.1-r1

This commit is contained in:
Oliver Smith 2018-09-26 09:34:50 +02:00
parent 290bf810d4
commit 17ba355220
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
6 changed files with 21 additions and 282 deletions

View file

@ -5,7 +5,7 @@
pkgname="binutils-aarch64"
pkgver=2.31.1
pkgrel=0
pkgrel=1
pkgdesc="Tools necessary to build programs for aarch64 targets"
url="https://www.gnu.org/software/binutils/"
depends=""
@ -16,6 +16,9 @@ arch="armhf x86_64 x86"
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
subpackages=""
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
x86-Properly-add-X86_ISA_1_NEEDED-property.patch
binutils-ld-fix-static-linking.patch
gold-mips.patch
"
@ -61,5 +64,8 @@ package() {
sha512sums="b42954e6f49a0adcd2676bdd77dfb59bfc25cec8184b007521d1e2b1d5d0593b58639e3d9448d5a40fe024c3cea386a37743627d6bb16d502f52a4a32b9573bd binutils-2.31.1.tar.bz2
d95fd77e1c2c4670a2a11979d6811b358ba0f067b917b33d241eca20cfe66553f6a6fccc5ec26d8d29045e487cb74389fbf86426f80cf81df95608835a566cfc x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
ce5d3c935057d624c1ce75722e7b5e4583812d46797edce8c381a94b2643f44f7bd0165e7e9b8e358955f4d979074ee487598efbf24389a4013681f99ff7c595 x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
1878bed194529afb2430af21ba9712d6819c5fdfdc5c8db652175bf86d0a0c710ac2bd3ec728bf874887301bd187d91bf60a374c47850c7bd2eafbf6653d74d8 x86-Properly-add-X86_ISA_1_NEEDED-property.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch"

View file

@ -1,93 +0,0 @@
From d66deb71f1537e2e30dccdfda22eed5d46ec47eb Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Wed, 14 Mar 2018 22:09:33 +1030
Subject: [PATCH] PowerPC64 debian bug 886264, out-of-line save/restore
functions
This calculation in relocate_section
if (stub_entry->stub_type == ppc_stub_save_res)
relocation += (stub_sec->output_offset
+ stub_sec->output_section->vma
+ stub_sec->size - htab->sfpr->size
- htab->sfpr->output_offset
- htab->sfpr->output_section->vma);
to adjust from the original out-of-line save/restore function address
in sfpr to a copy at the end of stub_sec goes wrong when stub_sec is
padded, because the copy is no longer at the end of stub_sec. The
solution is to pad before copying sfpr, so the copy is always at the
end of stub_sec.
* elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
sfpr size added before defining alias symbols.
(ppc64_elf_build_stubs): Add stub section padding before
copying sfpr contents and defining save/restore alias symbols.
(cherry picked from commit 7dda8d3cf3b089bb7e03c4cdbec827fc6a188c88)
---
bfd/ChangeLog | 9 +++++++++
bfd/elf64-ppc.c | 33 ++++++++++++++++++---------------
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 6fcdff0..039294f 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6645,7 +6645,7 @@ sfpr_define (struct bfd_link_info *info,
{
s->root.type = bfd_link_hash_defined;
s->root.u.def.section = stub_sec;
- s->root.u.def.value = (stub_sec->size
+ s->root.u.def.value = (stub_sec->size - htab->sfpr->size
+ h->elf.root.u.def.value);
s->ref_regular = 1;
s->def_regular = 1;
@@ -13232,20 +13232,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
for (group = htab->group; group != NULL; group = group->next)
if (group->needs_save_res)
- {
- stub_sec = group->stub_sec;
- memcpy (stub_sec->contents + stub_sec->size, htab->sfpr->contents,
- htab->sfpr->size);
- if (htab->params->emit_stub_syms)
- {
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
- if (!sfpr_define (info, &save_res_funcs[i], stub_sec))
- return FALSE;
- }
- stub_sec->size += htab->sfpr->size;
- }
+ group->stub_sec->size += htab->sfpr->size;
if (htab->relbrlt != NULL)
htab->relbrlt->reloc_count = 0;
@@ -13259,6 +13246,22 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
}
for (group = htab->group; group != NULL; group = group->next)
+ if (group->needs_save_res)
+ {
+ stub_sec = group->stub_sec;
+ memcpy (stub_sec->contents + stub_sec->size - htab->sfpr->size,
+ htab->sfpr->contents, htab->sfpr->size);
+ if (htab->params->emit_stub_syms)
+ {
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
+ if (!sfpr_define (info, &save_res_funcs[i], stub_sec))
+ return FALSE;
+ }
+ }
+
+ for (group = htab->group; group != NULL; group = group->next)
if ((stub_sec = group->stub_sec) != NULL)
{
stub_sec_count += 1;
--
2.9.3

View file

@ -5,7 +5,7 @@
pkgname="binutils-armhf"
pkgver=2.31.1
pkgrel=0
pkgrel=1
pkgdesc="Tools necessary to build programs for armhf targets"
url="https://www.gnu.org/software/binutils/"
depends=""
@ -16,6 +16,9 @@ arch="aarch64 x86_64 x86"
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
subpackages=""
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
x86-Properly-add-X86_ISA_1_NEEDED-property.patch
binutils-ld-fix-static-linking.patch
gold-mips.patch
"
@ -61,5 +64,8 @@ package() {
sha512sums="b42954e6f49a0adcd2676bdd77dfb59bfc25cec8184b007521d1e2b1d5d0593b58639e3d9448d5a40fe024c3cea386a37743627d6bb16d502f52a4a32b9573bd binutils-2.31.1.tar.bz2
d95fd77e1c2c4670a2a11979d6811b358ba0f067b917b33d241eca20cfe66553f6a6fccc5ec26d8d29045e487cb74389fbf86426f80cf81df95608835a566cfc x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
ce5d3c935057d624c1ce75722e7b5e4583812d46797edce8c381a94b2643f44f7bd0165e7e9b8e358955f4d979074ee487598efbf24389a4013681f99ff7c595 x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
1878bed194529afb2430af21ba9712d6819c5fdfdc5c8db652175bf86d0a0c710ac2bd3ec728bf874887301bd187d91bf60a374c47850c7bd2eafbf6653d74d8 x86-Properly-add-X86_ISA_1_NEEDED-property.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch"

View file

@ -1,93 +0,0 @@
From d66deb71f1537e2e30dccdfda22eed5d46ec47eb Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Wed, 14 Mar 2018 22:09:33 +1030
Subject: [PATCH] PowerPC64 debian bug 886264, out-of-line save/restore
functions
This calculation in relocate_section
if (stub_entry->stub_type == ppc_stub_save_res)
relocation += (stub_sec->output_offset
+ stub_sec->output_section->vma
+ stub_sec->size - htab->sfpr->size
- htab->sfpr->output_offset
- htab->sfpr->output_section->vma);
to adjust from the original out-of-line save/restore function address
in sfpr to a copy at the end of stub_sec goes wrong when stub_sec is
padded, because the copy is no longer at the end of stub_sec. The
solution is to pad before copying sfpr, so the copy is always at the
end of stub_sec.
* elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
sfpr size added before defining alias symbols.
(ppc64_elf_build_stubs): Add stub section padding before
copying sfpr contents and defining save/restore alias symbols.
(cherry picked from commit 7dda8d3cf3b089bb7e03c4cdbec827fc6a188c88)
---
bfd/ChangeLog | 9 +++++++++
bfd/elf64-ppc.c | 33 ++++++++++++++++++---------------
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 6fcdff0..039294f 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6645,7 +6645,7 @@ sfpr_define (struct bfd_link_info *info,
{
s->root.type = bfd_link_hash_defined;
s->root.u.def.section = stub_sec;
- s->root.u.def.value = (stub_sec->size
+ s->root.u.def.value = (stub_sec->size - htab->sfpr->size
+ h->elf.root.u.def.value);
s->ref_regular = 1;
s->def_regular = 1;
@@ -13232,20 +13232,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
for (group = htab->group; group != NULL; group = group->next)
if (group->needs_save_res)
- {
- stub_sec = group->stub_sec;
- memcpy (stub_sec->contents + stub_sec->size, htab->sfpr->contents,
- htab->sfpr->size);
- if (htab->params->emit_stub_syms)
- {
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
- if (!sfpr_define (info, &save_res_funcs[i], stub_sec))
- return FALSE;
- }
- stub_sec->size += htab->sfpr->size;
- }
+ group->stub_sec->size += htab->sfpr->size;
if (htab->relbrlt != NULL)
htab->relbrlt->reloc_count = 0;
@@ -13259,6 +13246,22 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
}
for (group = htab->group; group != NULL; group = group->next)
+ if (group->needs_save_res)
+ {
+ stub_sec = group->stub_sec;
+ memcpy (stub_sec->contents + stub_sec->size - htab->sfpr->size,
+ htab->sfpr->contents, htab->sfpr->size);
+ if (htab->params->emit_stub_syms)
+ {
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
+ if (!sfpr_define (info, &save_res_funcs[i], stub_sec))
+ return FALSE;
+ }
+ }
+
+ for (group = htab->group; group != NULL; group = group->next)
if ((stub_sec = group->stub_sec) != NULL)
{
stub_sec_count += 1;
--
2.9.3

View file

@ -5,7 +5,7 @@
pkgname="binutils-x86_64"
pkgver=2.31.1
pkgrel=0
pkgrel=1
pkgdesc="Tools necessary to build programs for x86_64 targets"
url="https://www.gnu.org/software/binutils/"
depends=""
@ -16,6 +16,9 @@ arch="armhf aarch64 x86"
license="GPL-2.0 GPL-3.0-or-later LGPL-2.0 BSD"
subpackages=""
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
x86-Properly-add-X86_ISA_1_NEEDED-property.patch
binutils-ld-fix-static-linking.patch
gold-mips.patch
"
@ -61,5 +64,8 @@ package() {
sha512sums="b42954e6f49a0adcd2676bdd77dfb59bfc25cec8184b007521d1e2b1d5d0593b58639e3d9448d5a40fe024c3cea386a37743627d6bb16d502f52a4a32b9573bd binutils-2.31.1.tar.bz2
d95fd77e1c2c4670a2a11979d6811b358ba0f067b917b33d241eca20cfe66553f6a6fccc5ec26d8d29045e487cb74389fbf86426f80cf81df95608835a566cfc x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
ce5d3c935057d624c1ce75722e7b5e4583812d46797edce8c381a94b2643f44f7bd0165e7e9b8e358955f4d979074ee487598efbf24389a4013681f99ff7c595 x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
1878bed194529afb2430af21ba9712d6819c5fdfdc5c8db652175bf86d0a0c710ac2bd3ec728bf874887301bd187d91bf60a374c47850c7bd2eafbf6653d74d8 x86-Properly-add-X86_ISA_1_NEEDED-property.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
f55cf2e0bf82f97583a1abe10710e4013ecf7d64f1da2ef8659a44a06d0dd8beaf58dab98a183488ea137f03e32d62efc878d95f018f836f8cec870bc448556f gold-mips.patch"

View file

@ -1,93 +0,0 @@
From d66deb71f1537e2e30dccdfda22eed5d46ec47eb Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Wed, 14 Mar 2018 22:09:33 +1030
Subject: [PATCH] PowerPC64 debian bug 886264, out-of-line save/restore
functions
This calculation in relocate_section
if (stub_entry->stub_type == ppc_stub_save_res)
relocation += (stub_sec->output_offset
+ stub_sec->output_section->vma
+ stub_sec->size - htab->sfpr->size
- htab->sfpr->output_offset
- htab->sfpr->output_section->vma);
to adjust from the original out-of-line save/restore function address
in sfpr to a copy at the end of stub_sec goes wrong when stub_sec is
padded, because the copy is no longer at the end of stub_sec. The
solution is to pad before copying sfpr, so the copy is always at the
end of stub_sec.
* elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
sfpr size added before defining alias symbols.
(ppc64_elf_build_stubs): Add stub section padding before
copying sfpr contents and defining save/restore alias symbols.
(cherry picked from commit 7dda8d3cf3b089bb7e03c4cdbec827fc6a188c88)
---
bfd/ChangeLog | 9 +++++++++
bfd/elf64-ppc.c | 33 ++++++++++++++++++---------------
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 6fcdff0..039294f 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6645,7 +6645,7 @@ sfpr_define (struct bfd_link_info *info,
{
s->root.type = bfd_link_hash_defined;
s->root.u.def.section = stub_sec;
- s->root.u.def.value = (stub_sec->size
+ s->root.u.def.value = (stub_sec->size - htab->sfpr->size
+ h->elf.root.u.def.value);
s->ref_regular = 1;
s->def_regular = 1;
@@ -13232,20 +13232,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
for (group = htab->group; group != NULL; group = group->next)
if (group->needs_save_res)
- {
- stub_sec = group->stub_sec;
- memcpy (stub_sec->contents + stub_sec->size, htab->sfpr->contents,
- htab->sfpr->size);
- if (htab->params->emit_stub_syms)
- {
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
- if (!sfpr_define (info, &save_res_funcs[i], stub_sec))
- return FALSE;
- }
- stub_sec->size += htab->sfpr->size;
- }
+ group->stub_sec->size += htab->sfpr->size;
if (htab->relbrlt != NULL)
htab->relbrlt->reloc_count = 0;
@@ -13259,6 +13246,22 @@ ppc64_elf_build_stubs (struct bfd_link_info *info,
}
for (group = htab->group; group != NULL; group = group->next)
+ if (group->needs_save_res)
+ {
+ stub_sec = group->stub_sec;
+ memcpy (stub_sec->contents + stub_sec->size - htab->sfpr->size,
+ htab->sfpr->contents, htab->sfpr->size);
+ if (htab->params->emit_stub_syms)
+ {
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++)
+ if (!sfpr_define (info, &save_res_funcs[i], stub_sec))
+ return FALSE;
+ }
+ }
+
+ for (group = htab->group; group != NULL; group = group->next)
if ((stub_sec = group->stub_sec) != NULL)
{
stub_sec_count += 1;
--
2.9.3