From 07792a696bf3bcecc7d34ae061ff92ab17b4f0d2 Mon Sep 17 00:00:00 2001 From: hotislandn Date: Wed, 3 Feb 2021 15:23:56 +0800 Subject: [PATCH] RV64: handle relocation type R_RISCV_CALL_PLT in PIC build. Signed-off-by: hotislandn --- libs/libc/machine/risc-v/rv64/arch_elf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/libc/machine/risc-v/rv64/arch_elf.c b/libs/libc/machine/risc-v/rv64/arch_elf.c index 247e50b546..202e8cec6f 100644 --- a/libs/libc/machine/risc-v/rv64/arch_elf.c +++ b/libs/libc/machine/risc-v/rv64/arch_elf.c @@ -66,6 +66,7 @@ static struct rname_code_s _rname_table[] = {"HI20", R_RISCV_HI20}, {"LO12_I", R_RISCV_LO12_I}, {"CALL", R_RISCV_CALL}, + {"CALL_PLT", R_RISCV_CALL_PLT}, {"BRANCH", R_RISCV_BRANCH}, {"RVC_JUMP", R_RISCV_RVC_JUMP}, {"RVC_BRANCH", R_RISCV_RVC_BRANCH}, @@ -318,6 +319,7 @@ int up_relocateadd(FAR const Elf64_Rela *rel, FAR const Elf64_Sym *sym, case R_RISCV_PCREL_HI20: case R_RISCV_CALL: + case R_RISCV_CALL_PLT: { binfo("%s at %08" PRIxPTR " [%08" PRIx32 "] " "to sym=%p st_value=%08" PRIx64 "\n",