summaryrefslogtreecommitdiff
path: root/toolchain/binutils/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2020-09-16 11:39:53 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2020-09-16 11:40:49 +0200
commitdd3671cee1580541c8c03fa8d94baa3d092bb964 (patch)
treef7e0c90394a007002179cb7f098a2db98787bda4 /toolchain/binutils/patches
parent7e92a1a6f8c22847129fd2b231d7d8acd560ad77 (diff)
binutils: fix for crisv32
Diffstat (limited to 'toolchain/binutils/patches')
-rw-r--r--toolchain/binutils/patches/2.35/cris32-revert.patch39
-rw-r--r--toolchain/binutils/patches/2.35/crisv32.patch12
2 files changed, 12 insertions, 39 deletions
diff --git a/toolchain/binutils/patches/2.35/cris32-revert.patch b/toolchain/binutils/patches/2.35/cris32-revert.patch
deleted file mode 100644
index e7d631a66..000000000
--- a/toolchain/binutils/patches/2.35/cris32-revert.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -Nur binutils-2.35.orig/bfd/elf32-cris.c binutils-2.35/bfd/elf32-cris.c
---- binutils-2.35.orig/bfd/elf32-cris.c 2020-07-24 11:12:19.000000000 +0200
-+++ binutils-2.35/bfd/elf32-cris.c 2020-09-07 10:56:01.075626508 +0200
-@@ -1021,7 +1021,6 @@
- bfd_reloc_status_type r;
- const char *symname = NULL;
- enum elf_cris_reloc_type r_type;
-- bfd_boolean resolved_to_zero;
-
- r_type = ELF32_R_TYPE (rel->r_info);
-
-@@ -1134,9 +1133,6 @@
- if (bfd_link_relocatable (info))
- continue;
-
-- resolved_to_zero = (h != NULL
-- && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h));
--
- switch (r_type)
- {
- case R_CRIS_16_GOTPLT:
-@@ -1439,7 +1435,6 @@
- case R_CRIS_16:
- case R_CRIS_32:
- if (bfd_link_pic (info)
-- && !resolved_to_zero
- && r_symndx != STN_UNDEF
- && (input_section->flags & SEC_ALLOC) != 0
- && ((r_type != R_CRIS_8_PCREL
-@@ -3357,8 +3352,7 @@
- render the symbol local. */
-
- /* No need to do anything if we're not creating a shared object. */
-- if (! bfd_link_pic (info)
-- || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
-+ if (! bfd_link_pic (info))
- break;
-
- /* We may need to create a reloc section in the dynobj and made room
diff --git a/toolchain/binutils/patches/2.35/crisv32.patch b/toolchain/binutils/patches/2.35/crisv32.patch
new file mode 100644
index 000000000..17f155a4b
--- /dev/null
+++ b/toolchain/binutils/patches/2.35/crisv32.patch
@@ -0,0 +1,12 @@
+diff -Nur binutils-2.35.orig/bfd/elf32-cris.c binutils-2.35/bfd/elf32-cris.c
+--- binutils-2.35.orig/bfd/elf32-cris.c 2020-07-24 11:12:19.000000000 +0200
++++ binutils-2.35/bfd/elf32-cris.c 2020-09-16 10:45:43.610956675 +0200
+@@ -3358,7 +3358,7 @@
+
+ /* No need to do anything if we're not creating a shared object. */
+ if (! bfd_link_pic (info)
+- || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
++ || (h != NULL && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)))
+ break;
+
+ /* We may need to create a reloc section in the dynobj and made room