summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elf.h3
-rw-r--r--linux-user/elfload.c4
-rw-r--r--target-microblaze/cpu.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/elf.h b/elf.h
index c84c8aba81..eb9e3bece7 100644
--- a/elf.h
+++ b/elf.h
@@ -119,7 +119,8 @@ typedef int64_t Elf64_Sxword;
*/
#define EM_S390_OLD 0xA390
-#define EM_XILINX_MICROBLAZE 0xBAAB
+#define EM_MICROBLAZE 189
+#define EM_MICROBLAZE_OLD 0xBAAB
/* This is the info that is needed to parse the dynamic section of the file */
#define DT_NULL 0
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 6bc51da957..1f27918beb 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -629,11 +629,11 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUState *env)
#define ELF_START_MMAP 0x80000000
-#define elf_check_arch(x) ( (x) == EM_XILINX_MICROBLAZE )
+#define elf_check_arch(x) ( (x) == EM_MICROBLAZE || (x) == EM_MICROBLAZE_OLD)
#define ELF_CLASS ELFCLASS32
#define ELF_DATA ELFDATA2MSB
-#define ELF_ARCH EM_XILINX_MICROBLAZE
+#define ELF_ARCH EM_MICROBLAZE
static inline void init_thread(struct target_pt_regs *regs, struct image_info *infop)
{
diff --git a/target-microblaze/cpu.h b/target-microblaze/cpu.h
index ec2ca183d7..33167977f2 100644
--- a/target-microblaze/cpu.h
+++ b/target-microblaze/cpu.h
@@ -31,7 +31,7 @@ struct CPUMBState;
#define TARGET_HAS_ICE 1
-#define ELF_MACHINE EM_XILINX_MICROBLAZE
+#define ELF_MACHINE EM_MICROBLAZE
#define EXCP_NMI 1
#define EXCP_MMU 2