proc/elf: fix aarch64 relocations

This commit is contained in:
Mark Poliakov 2024-03-18 19:36:42 +02:00
parent 0a2d2ea4db
commit ffeb4522c9

View File

@ -400,7 +400,7 @@ fn write_rela(rela: &Rela, space: &ProcessAddressSpace, b: usize) -> Result<(),
let rel_field = rela.r_offset as usize + b;
let (value, width) = match rela.r_type {
elf::abi::R_X86_64_RELATIVE => {
elf::abi::R_X86_64_RELATIVE | elf::abi::R_AARCH64_RELATIVE => {
// B + A
// Width: qword
(b as i64 + a, 8)