MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / get_relocation_info

Method get_relocation_info

rust/src/relocation.rs:321–341  ·  view source on GitHub ↗
(
        &self,
        bv: &BinaryView,
        arch: &CoreArchitecture,
        info: &mut [RelocationInfo],
    )

Source from the content-addressed store, hash-verified

319 type Handle = Self;
320
321 fn get_relocation_info(
322 &self,
323 bv: &BinaryView,
324 arch: &CoreArchitecture,
325 info: &mut [RelocationInfo],
326 ) -> bool {
327 let mut raw_info = info.iter().map(|i| i.as_raw()).collect::<Vec<_>>();
328 let res = unsafe {
329 BNRelocationHandlerGetRelocationInfo(
330 self.0,
331 bv.handle,
332 arch.handle,
333 raw_info.as_mut_ptr(),
334 raw_info.len(),
335 )
336 };
337 for (info, raw) in info.iter_mut().zip(raw_info.iter()) {
338 *info = RelocationInfo::from_raw(raw);
339 }
340 res
341 }
342
343 fn apply_relocation(
344 &self,

Callers 1

cb_get_relocation_infoFunction · 0.45

Calls 4

mapMethod · 0.80
iterMethod · 0.45
as_rawMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected