criu/compel/arch
dong sunchao dcd9df7389 compel/mips: Relax ELF magic check to support MIPS libraries
On MIPS platforms, shared libraries may use EI_ABIVERSION = 5 to indicate
support for .MIPS.xhash sections. The previous ELF header check in
handle_binary() strictly compared e_ident against a hardcoded value,
causing legitimate shared objects to be rejected.

This patch replaces the memcmp-based check with a structured validation
of ELF magic and class, and allows EI_ABIVERSION values beside 0.

fixes: #2745
Signed-off-by: dong sunchao <dongsunchao@gmail.com>
2025-09-18 22:24:58 -07:00
..
aarch64 arm64: C/R PAC keys 2025-03-15 11:59:19 +00:00
arm arm64: C/R PAC keys 2025-03-15 11:59:19 +00:00
loongarch64 arm64: C/R PAC keys 2025-03-15 11:59:19 +00:00
mips compel/mips: Relax ELF magic check to support MIPS libraries 2025-09-18 22:24:58 -07:00
ppc64 arm64: C/R PAC keys 2025-03-15 11:59:19 +00:00
riscv64 arm64: C/R PAC keys 2025-03-15 11:59:19 +00:00
s390 arm64: C/R PAC keys 2025-03-15 11:59:19 +00:00
x86 arm64: C/R PAC keys 2025-03-15 11:59:19 +00:00