MCPcopy Create free account
hub / github.com/eigenform/perfect / backward_relocation

Method backward_relocation

perfect/src/asm.rs:512–531  ·  view source on GitHub ↗
(&mut self, name: &'static str, 
        target_offset: isize, field_offset: u8, ref_offset: u8, 
        kind: Self::Relocation)

Source from the content-addressed store, hash-verified

510 }
511
512 fn backward_relocation(&mut self, name: &'static str,
513 target_offset: isize, field_offset: u8, ref_offset: u8,
514 kind: Self::Relocation)
515 {
516 let location = self.offset();
517 let label = match self.labels.place_local_reference(name) {
518 Some(label) => label,
519 None => {
520 self.error = Some(
521 DynasmError::UnknownLabel(LabelKind::Local(name))
522 );
523 return;
524 }
525 };
526 self.relocs.add_static(label,
527 PatchLoc::new(
528 location, target_offset, field_offset, ref_offset, kind
529 )
530 );
531 }
532
533 fn bare_relocation(&mut self,
534 target: usize, field_offset: u8, ref_offset: u8,

Callers

nothing calls this directly

Calls 1

offsetMethod · 0.45

Tested by

no test coverage detected