Date: Wed, 11 Feb 2015 14:59:35 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278580 - head/contrib/elftoolchain/libdwarf Message-ID: <201502111459.t1BExZHk042540@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Feb 11 14:59:35 2015 New Revision: 278580 URL: https://svnweb.freebsd.org/changeset/base/278580 Log: libdwarf: Add aarch64 relocation support Reviewed by: andrew, rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1817 Modified: head/contrib/elftoolchain/libdwarf/libdwarf.h head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Modified: head/contrib/elftoolchain/libdwarf/libdwarf.h ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf.h Wed Feb 11 12:08:40 2015 (r278579) +++ head/contrib/elftoolchain/libdwarf/libdwarf.h Wed Feb 11 14:59:35 2015 (r278580) @@ -439,6 +439,7 @@ enum Dwarf_ISA { DW_ISA_SPARC, DW_ISA_X86, DW_ISA_X86_64, + DW_ISA_AARCH64, DW_ISA_MAX }; Modified: head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Wed Feb 11 12:08:40 2015 (r278579) +++ head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Wed Feb 11 14:59:35 2015 (r278580) @@ -35,6 +35,8 @@ _dwarf_get_reloc_type(Dwarf_P_Debug dbg, 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, D 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502111459.t1BExZHk042540>