diff options
author | Guo Ren <ren_guo@c-sky.com> | 2018-12-31 22:27:29 +0800 |
---|---|---|
committer | Guo Ren <ren_guo@c-sky.com> | 2018-12-31 23:17:24 +0800 |
commit | 6256734f9173b19e8dd1e21e04b1398a0137f99b (patch) | |
tree | 421cfc6d6851b219de9695a5eb9c25dce1e5b30a /arch | |
parent | 0c87bb0e872cbbad59a965fc67668364066aa85e (diff) | |
download | linux-6256734f9173b19e8dd1e21e04b1398a0137f99b.tar.bz2 |
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: Guo Ren <ren_guo@c-sky.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/csky/include/asm/elf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/csky/include/asm/elf.h b/arch/csky/include/asm/elf.h index d6dbc00e3533..e1ec558278bc 100644 --- a/arch/csky/include/asm/elf.h +++ b/arch/csky/include/asm/elf.h @@ -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. |