summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2022-06-02 16:34:10 +0100
committerJohn-Mark Bell <jmb@netsurf-browser.org>2022-11-02 18:46:05 +0000
commit1fa07c6d22505158ecd341ab57b892284f0f2549 (patch)
treec4cddd6a084f66f7b429a0ffd29f150f818c0e5a
parent33560454a2650f9e0e27f10e36b2e5247a3ed0fd (diff)
downloadtoolchains-1fa07c6d22505158ecd341ab57b892284f0f2549.tar.gz
toolchains-1fa07c6d22505158ecd341ab57b892284f0f2549.tar.bz2
Fix OS ABI check when building elf2aif for EABI
Binaries built with the arm-riscos-gnueabihf toolchain have an OS ABI of none (i.e. Sys-V) in the ELF header. elf2aif expected the declared ABI to be ARM as that is what the previous tooling emitted. Fix up this check to reflect the new reality.
-rw-r--r--arm-riscos-gnueabihf/recipes/patches/gccsdk/elf2aif-no-abi-check.p16
1 files changed, 16 insertions, 0 deletions
diff --git a/arm-riscos-gnueabihf/recipes/patches/gccsdk/elf2aif-no-abi-check.p b/arm-riscos-gnueabihf/recipes/patches/gccsdk/elf2aif-no-abi-check.p
new file mode 100644
index 0000000..3ad6372
--- /dev/null
+++ b/arm-riscos-gnueabihf/recipes/patches/gccsdk/elf2aif-no-abi-check.p
@@ -0,0 +1,16 @@
+Index: elf2aif/src/elf2aif.c
+===================================================================
+--- elf2aif/src/elf2aif.c (revision 7698)
++++ elf2aif/src/elf2aif.c (working copy)
+@@ -201,7 +201,11 @@
+ return EXIT_FAILURE;
+ }
+
++#ifndef __ARM_EABI__
+ if (elf_ehdr.e_ident[EI_OSABI] != ELFOSABI_ARM)
++#else
++ if (elf_ehdr.e_ident[EI_OSABI] != ELFOSABI_NONE)
++#endif
+ {
+ fprintf (stderr, "ELF file '%s' is not for ARM\n", elf_filename);
+ return EXIT_FAILURE;