mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
cpukit/libdl: Fix the RISC-V relocations
The RISC-V backend had four defects, each of which alone prevented a module from loading. R_RISCV_RELAX, the four thread local storage types and the two ULEB128 types had no case and failed the load. The addend of the relocation was never applied. Relocations against a section symbol were skipped, which left the C++ unwind tables unrelocated. R_RISCV_PCREL_LO12_I and R_RISCV_PCREL_LO12_S used the symbol of their own record. The psABI defines this symbol as a label on the AUIPC instruction and the value as the low twelve bits of the value computed by the paired R_RISCV_PCREL_HI20. Take the value from the paired relocation and defer it if that one is not yet applied. Close #5707. Assisted-by: Claude:claude-opus-5 claude-code Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
1 parent
70d9de174e
commit
e19acd2a68
1 file changed
+310
-113
+310
-113
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user