Commit 6256734f authored by Guo Ren's avatar Guo Ren

csky: Add EM_CSKY_OLD 39

C-SKY historically used 39, the same value as MCORE, from which the
architecture was derived.

C-SKY binutils support both EM_CSKY and EM_CSKY_OLD, confirmed by
binutils:include/elf/common.h
Signed-off-by: default avatarGuo Ren <ren_guo@c-sky.com>
parent 0c87bb0e
......@@ -8,6 +8,7 @@
#include <abi/regdef.h>
#define ELF_ARCH EM_CSKY
#define EM_CSKY_OLD 39
/* CSKY Relocations */
#define R_CSKY_NONE 0
......@@ -43,7 +44,8 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
#define elf_check_arch(x) (((x)->e_machine == ELF_ARCH) || \
((x)->e_machine == EM_CSKY_OLD))
/*
* These are used to set parameters in the core dumps.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment