diff options
Diffstat (limited to 'libdwarf/libdwarf_reloc.c')
| -rw-r--r-- | libdwarf/libdwarf_reloc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libdwarf/libdwarf_reloc.c b/libdwarf/libdwarf_reloc.c index 4ae8f5c3eb70..2b1ad7214db6 100644 --- a/libdwarf/libdwarf_reloc.c +++ b/libdwarf/libdwarf_reloc.c @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_reloc.c 3198 2015-05-14 18:36:19Z emaste $"); +ELFTC_VCSID("$Id: libdwarf_reloc.c 3578 2017-09-14 02:21:28Z emaste $"); Dwarf_Unsigned _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) @@ -49,6 +49,8 @@ _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) 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: @@ -101,6 +103,12 @@ _dwarf_get_reloc_size(Dwarf_Debug dbg, Dwarf_Unsigned rel_type) 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); |
