Add an external relocation at the current offset.
(
&mut self,
kind: Reloc,
target: &T,
addend: Addend,
)
| 1733 | |
| 1734 | /// Add an external relocation at the current offset. |
| 1735 | pub fn add_reloc<T: Into<RelocTarget> + Clone>( |
| 1736 | &mut self, |
| 1737 | kind: Reloc, |
| 1738 | target: &T, |
| 1739 | addend: Addend, |
| 1740 | ) { |
| 1741 | self.add_reloc_at_offset(self.data.len() as CodeOffset, kind, target, addend); |
| 1742 | } |
| 1743 | |
| 1744 | /// Add a trap record at the current offset. |
| 1745 | pub fn add_trap(&mut self, code: TrapCode) { |