RISC-V: Add awareness for RISC-V reloations
This patch adds awareness of RISC-V relocations throughout the grub tools as well as dynamic linkage and elf->PE relocation conversion support. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
b3213ec755
commit
893ed83b2e
5 changed files with 662 additions and 5 deletions
|
@ -292,12 +292,14 @@ grub_arch_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
|
|||
grub_size_t *got);
|
||||
#endif
|
||||
|
||||
#if defined (__powerpc__) || defined (__mips__) || defined (__arm__)
|
||||
#if defined (__powerpc__) || defined (__mips__) || defined (__arm__) || \
|
||||
(defined(__riscv) && (__riscv_xlen == 32))
|
||||
#define GRUB_ARCH_DL_TRAMP_ALIGN 4
|
||||
#define GRUB_ARCH_DL_GOT_ALIGN 4
|
||||
#endif
|
||||
|
||||
#if defined (__aarch64__) || defined (__sparc__)
|
||||
#if defined (__aarch64__) || defined (__sparc__) || \
|
||||
(defined(__riscv) && (__riscv_xlen == 64))
|
||||
#define GRUB_ARCH_DL_TRAMP_ALIGN 8
|
||||
#define GRUB_ARCH_DL_GOT_ALIGN 8
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue