diff options
author | Alexander Graf | 2018-06-05 19:20:32 +0200 |
---|---|---|
committer | Alexander Graf | 2018-06-14 10:52:14 +0200 |
commit | de452c04c391948dbff68029e900fbb10dd5efb2 (patch) | |
tree | 9806d73ef898c5ad05b372ecc6fb6efe67b4a5f2 /include/pe.h | |
parent | acaee30608ce203289a180d664b7f0abb2e64ee7 (diff) |
riscv: Add support for HI20 PE relocations
The PE standard allows for HI20/LOW12 relocations. Within the efi_loader
target we always know that our relocation target is 4k aligned, so we
don't need to worry about the LOW12 part.
This patch adds support for the respective relocations. With this and a
few grub patches I have cooking in parallel I'm able to run grub on RISC-V.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/pe.h')
-rw-r--r-- | include/pe.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/pe.h b/include/pe.h index d73eb142cb3..36e1908b7ea 100644 --- a/include/pe.h +++ b/include/pe.h @@ -201,10 +201,13 @@ typedef struct _IMAGE_RELOCATION #define IMAGE_REL_BASED_MIPS_JMPADDR 5 #define IMAGE_REL_BASED_ARM_MOV32A 5 /* yes, 5 too */ #define IMAGE_REL_BASED_ARM_MOV32 5 /* yes, 5 too */ +#define IMAGE_REL_BASED_RISCV_HI20 5 /* yes, 5 too */ #define IMAGE_REL_BASED_SECTION 6 #define IMAGE_REL_BASED_REL 7 #define IMAGE_REL_BASED_ARM_MOV32T 7 /* yes, 7 too */ #define IMAGE_REL_BASED_THUMB_MOV32 7 /* yes, 7 too */ +#define IMAGE_REL_BASED_RISCV_LOW12I 7 /* yes, 7 too */ +#define IMAGE_REL_BASED_RISCV_LOW12S 8 #define IMAGE_REL_BASED_MIPS_JMPADDR16 9 #define IMAGE_REL_BASED_IA64_IMM64 9 /* yes, 9 too */ #define IMAGE_REL_BASED_DIR64 10 |