diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2022-06-02 16:34:10 +0100 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2023-03-05 20:00:09 +0000 |
commit | dbfc576658cf6f641ae3444b34f10441aaea1fbd (patch) | |
tree | 9333dc0ff1798ce0c88ad939895fbba811d04245 | |
parent | 7785b12e408974061c60a3b7d673ab34769809cc (diff) | |
download | toolchains-dbfc576658cf6f641ae3444b34f10441aaea1fbd.tar.gz toolchains-dbfc576658cf6f641ae3444b34f10441aaea1fbd.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.p | 16 |
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; |