Function goblin::elf64::rela::from_raw [] [src]

pub unsafe fn from_raw<'a>(ptr: *const Rela, size: usize) -> &'a [Rela]

Gets the rela entries given a rela u64 and the size of the rela section in the binary, in bytes. Works for regular rela and the pltrela table. Assumes the pointer is valid and can safely return a slice of memory pointing to the relas because: 1. rela points to memory received from the kernel (i.e., it loaded the executable), or 2. The binary has already been mmapped (i.e., it's a SharedObject), and hence it's safe to return a slice of that memory. 3. Or if you obtained the pointer in some other lawful manner