Skip to main content

perform_relocations

Function perform_relocations 

Source
pub fn perform_relocations(
    code: *mut u8,
    code_rx: *const u8,
    relocs: &[AsmReloc],
    get_address: impl Fn(&RelocTarget) -> *const u8,
    get_got_entry: impl Fn(&RelocTarget) -> *const u8,
    get_plt_entry: impl Fn(&RelocTarget) -> *const u8,
)
Expand description

A generic implementation of relocation resolving.

ยงNOTE

Very simple and incomplete. At the moment only Abs4, Abs8, X86 and RISC-V GOT relocations are supported.