aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/binutils
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2017-02-23 22:16:00 +0100
committerJonas Gorski <jonas.gorski@gmail.com>2017-02-27 12:15:45 +0100
commit5e3fb70094e5f87fb8dbfd4d8e979cd57293eb71 (patch)
tree63a5d70094d28c85110bed5936e32aaf8ed67011 /toolchain/binutils
parentd48cc5e0449fec6f7717e85a68f06a61abd7b0ae (diff)
downloadupstream-5e3fb70094e5f87fb8dbfd4d8e979cd57293eb71.tar.gz
upstream-5e3fb70094e5f87fb8dbfd4d8e979cd57293eb71.tar.bz2
upstream-5e3fb70094e5f87fb8dbfd4d8e979cd57293eb71.zip
toolchain: unbreak glibc on MIPS
Binutils recently updated the ABI version to 5, which broke glibc, as it refuses to load anything > 3. Upstream reverted the ABI version update, so backport the commit. Fixes the following error on boot: /bin/sh: error while loading shared libraries: /lib/libcrypt.so.1: ELF file ABI version invalid [ 0.920077] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 [ 0.920077] [ 0.929450] Rebooting in 1 seconds.. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Diffstat (limited to 'toolchain/binutils')
-rw-r--r--toolchain/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/toolchain/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch b/toolchain/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch
new file mode 100644
index 0000000000..36e09b1bba
--- /dev/null
+++ b/toolchain/binutils/patches/2.27/001-MIPS_BFD_Remove_EI_ABIVERSION_5.patch
@@ -0,0 +1,36 @@
+From 4d4f40e041ce7c8c7c8e50f957e0440b64ab7e95 Mon Sep 17 00:00:00 2001
+From: "Maciej W. Rozycki" <macro@imgtec.com>
+Date: Fri, 23 Dec 2016 20:03:36 +0000
+Subject: [PATCH] MIPS/BFD: Remove EI_ABIVERSION 5 allocation for PT_GNU_STACK
+ support
+
+Revert commit 17733f5be961 ("Increment the ABIVERSION to 5 for MIPS
+objects with non-executable stacks.") and remove EI_ABIVERSION 5
+allocation for PT_GNU_STACK support, which has not made it to glibc
+and will be reassigned.
+
+ bfd/
+ * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Revert
+ 2016-02-23 change and remove EI_ABIVERSION 5 support.
+---
+ bfd/ChangeLog | 5 +++++
+ bfd/elfxx-mips.c | 3 ---
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
+index d649676..486607c 100644
+--- a/bfd/elfxx-mips.c
++++ b/bfd/elfxx-mips.c
+@@ -16358,9 +16358,6 @@ _bfd_mips_post_process_headers (bfd *abfd, struct bfd_link_info *link_info)
+ if (mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64
+ || mips_elf_tdata (abfd)->abiflags.fp_abi == Val_GNU_MIPS_ABI_FP_64A)
+ i_ehdrp->e_ident[EI_ABIVERSION] = 3;
+-
+- if (elf_stack_flags (abfd) && !(elf_stack_flags (abfd) & PF_X))
+- i_ehdrp->e_ident[EI_ABIVERSION] = 5;
+ }
+
+ int
+--
+2.9.3
+