riscv: Handle some usual relocs

this is enough to let me link a tcctest.c compiled by GCC
using some current debian sid riscv64 system.  It needs
linking against libgcc.a for various floating point TFmode
routines.  The result runs.
This commit is contained in:
Michael Matz
2019-06-23 02:10:10 +02:00
parent 0676d5bc23
commit 1353ccd9e2
9 changed files with 225 additions and 20 deletions

View File

@@ -170,6 +170,10 @@ void relocate_init(Section *sr)
qrel = (ElfW_Rel *) sr->data;
}
void relocate_fini(Section *sr)
{
}
void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t addr, addr_t val)
{
int sym_index, esym_index;