Closed thixotropist closed 6 months ago
Generate the fedora39 exemplars within the fedora39 branch. We still need to review these new binaries in Ghidra and see if anything significant has changed.
The Fedora 39 RISCV-64 kernel and libc.so show some missing pieces in Ghidra 10.5.DEV support. At the moment we see:
R_RISCV_TLS_TPREL64
relocations based on the task pointer, for thread-local storage. Needed for libcgorci
, rev8
, and ctz
for the Zbb version of strcmp
. It's easy to add pcode semantics for these in Ghidra's riscv32b.sinc
- but doing so shows that these extensions need updating as the Zbb sinc code is out of date. Among other things, the gorci
instruction is deprecated and removed in the frozen extensionlq
instruction from the RV128I extension - it's surprising to see this single 128 bit instruction on a 64 bit kernel.It's worth noting that the Linux kernel uses riscv extensions without necessarily full binutils support. It also uses runtime self-modifying code, such as a boot-time patch applied to the strcmp
routine to jump to the strcmp_zbb
alternate optimized code if the Zbb extension is detected.
We use RISCV64 Fedora images as the reference source of importable RISCV64 binaries. A new Fedora is due out in October. We want to switch the RISCV relocation tests from Fedora 38 to Fedora 39 and update import integration tests to match.
Additionally, we want to scan this updated image for new instruction set extensions.