Fix relocation issues on riscv and update test scripts and CI to enable test spec cases on riscv QEMU.