zephyr/arch/riscv
Eric Ackermann 2d3390f866 llext: Fix off-by-one in RISC-V truncation check
The RISC-V architecture-specific relocations need to check whether
each required relocation can fit into the modified instruction's
immediate. All immediates in RISC-V are encoded as two's complement.
The current truncation check has an off-by-one error for checking
the maximum negative distance, as two's complement encoding can
represent a negative value that is the maximum positive value plus
one, causing LLEXT to refuse loading valid code.
This commit adds an additional condition to the check that fixes
the aforementioned issue.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-01-10 14:47:39 +01:00
..
core llext: Fix off-by-one in RISC-V truncation check 2025-01-10 14:47:39 +01:00
include init: support per-core init hook 2024-11-16 14:04:25 -05:00
CMakeLists.txt riscv: syscalls: use zephyr_syscall_header 2023-06-17 07:57:45 -04:00
Kconfig Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
Kconfig.isa riscv: Introduce BitManip extensions 2022-08-29 16:57:18 +02:00