summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-03-29 04:29:07 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-03-29 04:29:07 +0200
commitb73eafe9fce787415f67b940aca1f5210e3d476c (patch)
tree07571c74d8d3e441e29d0532d4dd91922ad49e2a /toolchain
parentef90b40eadcdd3b6d8a0dd80fb04bd653f7fd5c4 (diff)
cris: backport binutils patch for pr16044
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/binutils/patches/2.28/cris-pr16044.patch33
-rw-r--r--toolchain/binutils/patches/2.28/crisv10-assertion-remove.patch15
2 files changed, 33 insertions, 15 deletions
diff --git a/toolchain/binutils/patches/2.28/cris-pr16044.patch b/toolchain/binutils/patches/2.28/cris-pr16044.patch
new file mode 100644
index 000000000..f219623dc
--- /dev/null
+++ b/toolchain/binutils/patches/2.28/cris-pr16044.patch
@@ -0,0 +1,33 @@
+diff -Nur binutils-2.28.orig/bfd/elf32-cris.c binutils-2.28/bfd/elf32-cris.c
+--- binutils-2.28.orig/bfd/elf32-cris.c 2017-03-02 09:23:53.000000000 +0100
++++ binutils-2.28/bfd/elf32-cris.c 2017-03-29 04:09:00.227801746 +0200
+@@ -2714,8 +2714,9 @@
+ struct bfd_link_info *info = (struct bfd_link_info *) p;
+
+ /* A GOTPLT reloc, when activated, is supposed to be included into
+- the PLT refcount. */
++ the PLT refcount, when the symbol isn't set-or-forced local. */
+ BFD_ASSERT (h->gotplt_refcount == 0
++ || h->root.plt.refcount == -1
+ || h->gotplt_refcount <= h->root.plt.refcount);
+
+ /* If nobody wanted a GOTPLT with this symbol, we're done. */
+@@ -2741,6 +2742,7 @@
+ srelgot = elf_hash_table (info)->srelgot;
+
+ /* Put accurate refcounts there. */
++ BFD_ASSERT (h->root.got.refcount >= 0);
+ h->root.got.refcount += h->gotplt_refcount;
+ h->reg_got_refcount = h->gotplt_refcount;
+
+@@ -3476,7 +3478,9 @@
+ continue;
+
+ h->needs_plt = 1;
+- h->plt.refcount++;
++ /* If the symbol is forced local, the refcount is unavailable. */
++ if (h->plt.refcount != -1)
++ h->plt.refcount++;
+ break;
+
+ case R_CRIS_8:
diff --git a/toolchain/binutils/patches/2.28/crisv10-assertion-remove.patch b/toolchain/binutils/patches/2.28/crisv10-assertion-remove.patch
deleted file mode 100644
index e7ccf1e61..000000000
--- a/toolchain/binutils/patches/2.28/crisv10-assertion-remove.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Nur binutils-2.28.orig/bfd/elf32-cris.c binutils-2.28/bfd/elf32-cris.c
---- binutils-2.28.orig/bfd/elf32-cris.c 2017-03-02 09:23:53.000000000 +0100
-+++ binutils-2.28/bfd/elf32-cris.c 2017-03-05 09:38:18.895667626 +0100
-@@ -2713,11 +2713,6 @@
- {
- struct bfd_link_info *info = (struct bfd_link_info *) p;
-
-- /* A GOTPLT reloc, when activated, is supposed to be included into
-- the PLT refcount. */
-- BFD_ASSERT (h->gotplt_refcount == 0
-- || h->gotplt_refcount <= h->root.plt.refcount);
--
- /* If nobody wanted a GOTPLT with this symbol, we're done. */
- if (h->gotplt_refcount <= 0)
- return TRUE;