diff options
author | Peter Crosthwaite <crosthwaite.peter@gmail.com> | 2015-07-19 05:02:37 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-09-25 12:04:43 +0200 |
commit | 75be901cdcd20acc724534e2dff58bc7b539292f (patch) | |
tree | 03eaf99f1102c0d800760ef02a0be581bedff112 | |
parent | 6bde8fd69f874a107f04cea2695ebece849213c5 (diff) | |
download | qemu-75be901cdcd20acc724534e2dff58bc7b539292f.zip qemu-75be901cdcd20acc724534e2dff58bc7b539292f.tar.gz qemu-75be901cdcd20acc724534e2dff58bc7b539292f.tar.bz2 |
linux_user: elfload: Default ELF_MACHINE to ELF_ARCH
In most (but not all) cases, ELF_MACHINE and ELF_ARCH are safely the
same. Default ELF_MACHINE to ELF_ARCH. This makes defining ELF_MACHINE
optional for target-*/cpu.h when they are known to match.
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>
-rw-r--r-- | linux-user/elfload.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 39f3282..4ed8c5e 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1245,6 +1245,10 @@ static inline void init_thread(struct target_pt_regs *regs, #define ELF_PLATFORM (NULL) #endif +#ifndef ELF_MACHINE +#define ELF_MACHINE ELF_ARCH +#endif + #ifndef ELF_HWCAP #define ELF_HWCAP 0 #endif |