riscv64: add shared library support