qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 10/19] or32: Remove ELF_MACHINE from cpu.h


From: Peter Crosthwaite
Subject: [Qemu-devel] [PATCH 10/19] or32: Remove ELF_MACHINE from cpu.h
Date: Sat, 15 Aug 2015 16:28:20 -0700

From: Peter Crosthwaite <address@hidden>

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 <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
---
 hw/openrisc/openrisc_sim.c | 2 +-
 target-openrisc/cpu.h      | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 1da0657..fb6d8ea 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -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,
diff --git a/target-openrisc/cpu.h b/target-openrisc/cpu.h
index 36c4f20..ac8b969 100644
--- a/target-openrisc/cpu.h
+++ b/target-openrisc/cpu.h
@@ -21,7 +21,6 @@
 #define CPU_OPENRISC_H
 
 #define TARGET_LONG_BITS 32
-#define ELF_MACHINE    EM_OPENRISC
 
 #define CPUArchState struct CPUOpenRISCState
 
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]