diff options
author | Rick Chen <rick@andestech.com> | 2017-12-26 13:55:58 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-12 08:05:12 -0500 |
commit | 068feb9b86d991283c43b56e36094f4e6f484d04 (patch) | |
tree | 48810d14016cccf4565c394383d59f449c8c3347 /include | |
parent | c7d7e80acdd5585a63ca548e87c8694dc9d2fefa (diff) |
riscv: Modify generic codes to support RISC-V
Support common commands bdinfo and image format,
also modify common generic flow for RISC-V.
Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Signed-off-by: Greentime Hu <green.hu@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/elf.h | 5 | ||||
-rw-r--r-- | include/image.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/elf.h b/include/elf.h index aaecac799e..fe2128f378 100644 --- a/include/elf.h +++ b/include/elf.h @@ -613,6 +613,11 @@ unsigned long elf_hash(const unsigned char *name); #define R_AARCH64_NONE 0 /* No relocation. */ #define R_AARCH64_RELATIVE 1027 /* Adjust by program base. */ +/* RISC-V relocations */ +#define R_RISCV_32 1 +#define R_RISCV_64 2 +#define R_RISCV_RELATIVE 3 + #ifndef __ASSEMBLER__ int valid_elf_image(unsigned long addr); #endif diff --git a/include/image.h b/include/image.h index a128a623e5..a41a8369c6 100644 --- a/include/image.h +++ b/include/image.h @@ -190,6 +190,7 @@ enum { IH_ARCH_ARC, /* Synopsys DesignWare ARC */ IH_ARCH_X86_64, /* AMD x86_64, Intel and Via */ IH_ARCH_XTENSA, /* Xtensa */ + IH_ARCH_RISCV, /* RISC-V */ IH_ARCH_COUNT, }; |