]> git.ipfire.org Git - thirdparty/grub.git/commit
util/grub-mkimagexx: Fix riscv32 relocation offset
authorAnaëlle Cazuc <acazuc@acazuc.fr>
Tue, 2 Sep 2025 09:50:51 +0000 (11:50 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 9 Sep 2025 23:12:17 +0000 (01:12 +0200)
commitabb8fb6d1af1fe3db06b97bfae87466685b23007
tree245e50d712fb151a5b31ddec3d9820dd317e0ab7
parent1f9092bfd57bd7cb8d5bd3f6d7431af37c081c85
util/grub-mkimagexx: Fix riscv32 relocation offset

When using grub-mkrescue for a riscv32 target, an invalid implicit cast
on the offset calculation produces an error during the relocation process:

  grub-mkrescue: error: target XXX not reachable from pc=fc.

This patch adds an explicit grub_int64_t cast to compute the offset
as a 64-bit subtraction.

Signed-off-by: Anaëlle Cazuc <acazuc@acazuc.fr>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub-mkimagexx.c