[klibc] Add RISC-V (RV64) port

RISC-V is pretty boring.  I've cribbed most of this from the MIPS and
AArch64 ports.

I ran into difficulty with initialisation of the gp,register, which I
think has to be process-global - the psABI says that signal handlers
can rely on it, and they could come from any module.  This means that
klibc.so and the executable using it need to agree on a single value.
Currently they don't, and this causes gp-relative addressing to go

gp-relative addressing is introduced by "relaxation" in the linker,
so I've disabled that for now.

Link: https://www.zytor.com/pipermail/klibc/2018-July/003997.html
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
12 files changed