Index: head/contrib/elftoolchain/libdwarf/libdwarf.h =================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf.h +++ head/contrib/elftoolchain/libdwarf/libdwarf.h @@ -440,6 +440,7 @@ DW_ISA_X86, DW_ISA_X86_64, DW_ISA_AARCH64, + DW_ISA_RISCV, DW_ISA_MAX }; Index: head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c =================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c +++ head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c @@ -54,6 +54,8 @@ return (R_ARM_ABS32); case DW_ISA_MIPS: return (is64 ? R_MIPS_64 : R_MIPS_32); + case DW_ISA_RISCV: + return (is64 ? R_RISCV_64 : R_RISCV_32); case DW_ISA_IA64: return (is64 ? R_IA_64_DIR64LSB : R_IA_64_DIR32LSB); default: @@ -106,6 +108,12 @@ else if (rel_type == R_MIPS_64) return (8); break; + case EM_RISCV: + if (rel_type == R_RISCV_32) + return (4); + else if (rel_type == R_RISCV_64) + return (8); + break; case EM_IA_64: if (rel_type == R_IA_64_SECREL32LSB) return (4);