diff options
author | Ed Maste <emaste@FreeBSD.org> | 2019-06-29 15:27:18 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2019-06-29 15:27:18 +0000 |
commit | a5b08c1484eac2c6a65e726f550b3189ff84c6c8 (patch) | |
tree | 01cd9d6d76e2c378b391422460c6f233ead08179 /libdwarf/libdwarf_reloc.c | |
parent | 2b92b30119ed91ed88f102ba9ecc40cd1c046a65 (diff) |
Notes
Diffstat (limited to 'libdwarf/libdwarf_reloc.c')
-rw-r--r-- | libdwarf/libdwarf_reloc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libdwarf/libdwarf_reloc.c b/libdwarf/libdwarf_reloc.c index 2b1ad7214db6..e76675838e41 100644 --- a/libdwarf/libdwarf_reloc.c +++ b/libdwarf/libdwarf_reloc.c @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_reloc.c 3578 2017-09-14 02:21:28Z emaste $"); +ELFTC_VCSID("$Id: libdwarf_reloc.c 3741 2019-06-07 06:32:01Z jkoshy $"); Dwarf_Unsigned _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) @@ -44,7 +44,7 @@ _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) case DW_ISA_SPARC: return (is64 ? R_SPARC_UA64 : R_SPARC_UA32); case DW_ISA_PPC: - return (R_PPC_ADDR32); + return (is64 ? R_PPC64_ADDR64 : R_PPC_ADDR32); case DW_ISA_ARM: return (R_ARM_ABS32); case DW_ISA_MIPS: @@ -97,6 +97,12 @@ _dwarf_get_reloc_size(Dwarf_Debug dbg, Dwarf_Unsigned rel_type) if (rel_type == R_PPC_ADDR32) return (4); break; + case EM_PPC64: + if (rel_type == R_PPC_ADDR32) + return (4); + else if (rel_type == R_PPC64_ADDR64) + return (8); + break; case EM_MIPS: if (rel_type == R_MIPS_32) return (4); |