Skip to content

Commit

Permalink
or32: Remove ELF_MACHINE from cpu.h
Browse files Browse the repository at this point in the history
The only generic code relying on this is linux-user, but linux users'
default behaviour of defaulting ELF_MACHINE to ELF_ARCH will handle
this.

The bootloader can just pass EM_OPENRISC directly, as that is
architecture specific code.

This removes another architecture specific definition from the global
namespace.

Cc: Jia Liu <proljc@gmail.com>
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>
  • Loading branch information
pcrost authored and bonzini committed Sep 25, 2015
1 parent 22d2fb4 commit ed03ecf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion hw/openrisc/openrisc_sim.c
Expand Up @@ -68,7 +68,7 @@ static void cpu_openrisc_load_kernel(ram_addr_t ram_size,

if (kernel_filename && !qtest_enabled()) {
kernel_size = load_elf(kernel_filename, NULL, NULL,
&elf_entry, NULL, NULL, 1, ELF_MACHINE, 1);
&elf_entry, NULL, NULL, 1, EM_OPENRISC, 1);
entry = elf_entry;
if (kernel_size < 0) {
kernel_size = load_uimage(kernel_filename,
Expand Down
1 change: 0 additions & 1 deletion target-openrisc/cpu.h
Expand Up @@ -21,7 +21,6 @@
#define CPU_OPENRISC_H

#define TARGET_LONG_BITS 32
#define ELF_MACHINE EM_OPENRISC

#define CPUArchState struct CPUOpenRISCState

Expand Down

0 comments on commit ed03ecf

Please sign in to comment.