openwrt/tools/include
Mathew McBride c98e09f01b tools: update elf.h
OpenWrt contains a 2012 copy of glibc's elf.h, which predates the
introduction of some newer architectures like Arm64 and RISC-V.

Linux 5.13 introduced the "gen-hyprel" tool into the kernel compile
(when virtualization/KVM is enabled) which requires EM_AARCH64 to be
defined.

arch/arm64/kvm/hyp/nvhe/gen-hyprel.c: In function 'init_elf':
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:289:43: error: 'EM_AARCH64'
  undeclared (first use in this function); did you mean 'EM_IA_64'?
  289 |  assert_eq(elf16toh(elf.ehdr->e_machine), EM_AARCH64, "%u");
      |                                           ^~~~~~~~~~

Update the copy of elf.h from the latest glibc to fix this.

Compile-tested: ath79, armvirt, mpc85xx, x86
Run-tested: armvirt

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-03-19 18:20:18 +01:00
..
asm build: fix kernel 5.4 on macos 2020-03-14 13:20:06 +00:00
sys add a portable version of sys/sysmacros.h and and let the kernel use the host include dir, fixes x86 builds on non-gnu systems 2011-07-02 06:49:56 +00:00
byteswap.h tools: include endian.h from byteswap.h to ensure that bswap_* is available 2013-07-06 14:49:08 +00:00
elf.h tools: update elf.h 2023-03-19 18:20:18 +01:00
endian.h tools: Update endian definitions for Mac OSX 2018-12-19 15:08:30 +00:00