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> | 2022-11-03 18:29:13 +0000 |
commit | d9f77f31cfe97f438495d020788557abcbb07ecc (patch) | |
tree | df572ed8c2fa5a24ddb7c155e27e496bcba904bc | |
parent | 44d904de54a42b9ac93826aa23b37dd33fadd7ec (diff) | |
download | toolchains-d9f77f31cfe97f438495d020788557abcbb07ecc.tar.gz toolchains-d9f77f31cfe97f438495d020788557abcbb07ecc.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; |