diff options
author | emaste <emaste@FreeBSD.org> | 2015-02-11 14:59:35 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-02-11 14:59:35 +0000 |
commit | 9287c3f25ebf5936575ed3751f1174a993b1c819 (patch) | |
tree | 7d1987dd3b03b146d957f3d70858d2ab56b98caa /contrib/elftoolchain/libdwarf | |
parent | 4f63d6859d817d846f6dfade0d5cb9edba019300 (diff) | |
download | FreeBSD-src-9287c3f25ebf5936575ed3751f1174a993b1c819.zip FreeBSD-src-9287c3f25ebf5936575ed3751f1174a993b1c819.tar.gz |
libdwarf: Add aarch64 relocation support
Reviewed by: andrew, rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1817
Diffstat (limited to 'contrib/elftoolchain/libdwarf')
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf.h | 1 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf_reloc.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/contrib/elftoolchain/libdwarf/libdwarf.h b/contrib/elftoolchain/libdwarf/libdwarf.h index 9a4a899..20360a7 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf.h +++ b/contrib/elftoolchain/libdwarf/libdwarf.h @@ -439,6 +439,7 @@ enum Dwarf_ISA { DW_ISA_SPARC, DW_ISA_X86, DW_ISA_X86_64, + DW_ISA_AARCH64, DW_ISA_MAX }; diff --git a/contrib/elftoolchain/libdwarf/libdwarf_reloc.c b/contrib/elftoolchain/libdwarf/libdwarf_reloc.c index ea91677..e3bba67 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_reloc.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_reloc.c @@ -35,6 +35,8 @@ _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) assert(dbg != NULL); switch (dbg->dbgp_isa) { + case DW_ISA_AARCH64: + return (is64 ? R_AARCH64_ABS64 : R_AARCH64_ABS32); case DW_ISA_X86: return (R_386_32); case DW_ISA_X86_64: @@ -62,6 +64,12 @@ _dwarf_get_reloc_size(Dwarf_Debug dbg, Dwarf_Unsigned rel_type) switch (dbg->dbg_machine) { case EM_NONE: break; + case EM_AARCH64: + if (rel_type == R_AARCH64_ABS32) + return (4); + else if (rel_type == R_AARCH64_ABS64) + return (8); + break; case EM_ARM: if (rel_type == R_ARM_ABS32) return (4); |