| 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, |