]> git.ipfire.org Git - thirdparty/qemu.git/commit - linux-user/elfload.c
linux-user: elfload: Provide default for elf_check_arch
authorPeter Crosthwaite <crosthwaite.peter@gmail.com>
Sun, 19 Jul 2015 18:29:32 +0000 (11:29 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Sep 2015 10:04:43 +0000 (12:04 +0200)
commitd276a604bfba002aafc3af2a906b7412907ea598
tree4adb706fb924242f98e6d8add6b8a0b41a90a0a6
parent75be901cdcd20acc724534e2dff58bc7b539292f
linux-user: elfload: Provide default for elf_check_arch

For many arch's this macro is defined as the predicatable behaviour
of checking the argument for eqaulity against ELF_ARCH. Provide a
default define as such, so only archs with special handling (usually
allowing multiple EM values) need to provide a def.

Arches that do any of:

1: provide this def exactly the same way as the new default
        (alpha, x86_64)
2: check against ELF_MACHINE while defining ELF_ARCH == ELF_MACHINE
        (arm, aarch64)
3: check against EM_FOO directly while defining ELF_ARCH == EM_FOO
        (unicore32, sparc32, ppc32, mips, openrisc, sh4, cris, m86k)

have their elf_check_arch removed as the default will provide the
correct behaviour.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Acked-By: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
linux-user/elfload.c