libdwarf: Add aarch64 relocation support
Reviewed by: andrew, rpaulo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1817
This commit is contained in:
parent
5dbbe22ac8
commit
84c37881c6
@ -439,6 +439,7 @@ enum Dwarf_ISA {
|
||||
DW_ISA_SPARC,
|
||||
DW_ISA_X86,
|
||||
DW_ISA_X86_64,
|
||||
DW_ISA_AARCH64,
|
||||
DW_ISA_MAX
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user