From edd3dd316869d3ea42476426d9305a4608a00e40 Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Thu, 25 Jun 2020 14:54:27 +0900 Subject: [PATCH] libs: rv64: Fix _calc_imm() in arch_elf.c --- libs/libc/machine/risc-v/rv64/arch_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libc/machine/risc-v/rv64/arch_elf.c b/libs/libc/machine/risc-v/rv64/arch_elf.c index 259a22f516..d27ac92439 100644 --- a/libs/libc/machine/risc-v/rv64/arch_elf.c +++ b/libs/libc/machine/risc-v/rv64/arch_elf.c @@ -150,7 +150,7 @@ static void _calc_imm(long offset, long *imm_hi, long *imm_lo) { hi++; } - else if (r <= -2048) + else if (r < -2048) { hi--; }