From 55040845f35a564cf54b89b808ee0e33ee783630 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 23 Jun 2019 08:21:52 +0200 Subject: [PATCH] riscv: Handle JUMP_SLOT reloc so that -run works. --- riscv64-link.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/riscv64-link.c b/riscv64-link.c index 6db14e61..36876688 100644 --- a/riscv64-link.c +++ b/riscv64-link.c @@ -60,6 +60,7 @@ int gotplt_entry_type (int reloc_type) case R_RISCV_RELAX: case R_RISCV_RVC_BRANCH: case R_RISCV_RVC_JUMP: + case R_RISCV_JUMP_SLOT: return NO_GOTPLT_ENTRY; case R_RISCV_BRANCH: @@ -282,6 +283,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, case R_RISCV_32: write32le(ptr, val); return; + case R_RISCV_JUMP_SLOT: case R_RISCV_64: write64le(ptr, val); return;