RTEMS | libdl and related shell extensions are not supported on RISC-V (#5144)

Pavel Pisa (@ppisa) gitlab at rtems.org
Thu Nov 14 10:15:37 UTC 2024




Pavel Pisa commented: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5144#note_114931


My test code with my libdl-riscv.diff builds completely but I have stuck on some sane setup of BeagleV-Fire for testing. May it be, I try QEMU the first. As for the code, there are warnings and I do not like how  `Elf_Word *where;` is assigned `where = (Elf_Addr *)(sect->base + rela->r_offset);` and used in the function `rtems_rtl_elf_reloc_rela()`. It would wort to check all relocation cases what should be the length of modified address in the binary image. I expect that it should be sometimes 32-bit Elf_Word for 32-bit targets but 64-bit for 64-bit targets. It should be of native endianning for constants acessed by LW but it should be little-endian when code is modified, because even big-endian RISC-V reads code in little-endian to allow variable length instructions. There rules seems to be mostly followed by the `rtl-mdreloc-riscv.c` code but I am not 100% confident and warnings make me even more unsure. So it should be check against spec.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5144#note_114931
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241114/3462a633/attachment.htm>


More information about the bugs mailing list