| 494 | } |
| 495 | |
| 496 | fn forward_relocation(&mut self, name: &'static str, |
| 497 | target_offset: isize, field_offset: u8, ref_offset: u8, |
| 498 | kind: Self::Relocation) |
| 499 | { |
| 500 | let location = self.offset(); |
| 501 | let label = match self.labels.place_local_reference(name) { |
| 502 | Some(label) => label.next(), |
| 503 | None => StaticLabel::first(name), |
| 504 | }; |
| 505 | self.relocs.add_static(label, |
| 506 | PatchLoc::new( |
| 507 | location, target_offset, field_offset, ref_offset, kind |
| 508 | ) |
| 509 | ); |
| 510 | } |
| 511 | |
| 512 | fn backward_relocation(&mut self, name: &'static str, |
| 513 | target_offset: isize, field_offset: u8, ref_offset: u8, |