Re: [PATCH v3 07/10] RISC-V: Add awareness for RISC-V reloations

2018-11-25 Thread Alexander Graf
On 21.11.18 16:51, Daniel Kiper wrote: > On Wed, Nov 14, 2018 at 06:27:36PM +0100, Alexander Graf wrote: >> 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 >> >>

Re: [PATCH v3 07/10] RISC-V: Add awareness for RISC-V reloations

2018-11-21 Thread Daniel Kiper
On Wed, Nov 21, 2018 at 05:08:09PM +0100, Andreas Schwab wrote: > On Nov 21 2018, Daniel Kiper wrote: > > >> + case R_RISCV_BRANCH: > >> +{ > >> + grub_uint32_t *abs_place = place; > >> + grub_ssize_t off = sym_addr - (grub_addr_t) place; > >> + grub_uint32_t imm12 = (off & 0x1

Re: [PATCH v3 07/10] RISC-V: Add awareness for RISC-V reloations

2018-11-21 Thread Andreas Schwab
On Nov 21 2018, Daniel Kiper wrote: >> +case R_RISCV_BRANCH: >> + { >> +grub_uint32_t *abs_place = place; >> +grub_ssize_t off = sym_addr - (grub_addr_t) place; >> +grub_uint32_t imm12 = (off & 0x1000) << (31 - 12); >> +grub_uint32_t imm11 = (off & 0x800)

Re: [PATCH v3 07/10] RISC-V: Add awareness for RISC-V reloations

2018-11-21 Thread Daniel Kiper
On Wed, Nov 14, 2018 at 06:27:36PM +0100, Alexander Graf wrote: > 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 > > --- > > v2 -> v3: > > - Fix riscv32 target > -

[PATCH v3 07/10] RISC-V: Add awareness for RISC-V reloations

2018-11-14 Thread Alexander Graf
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 --- v2 -> v3: - Fix riscv32 target --- grub-core/kern/dl.c | 6 +- grub-core/kern/riscv/dl.c | 335 ++