Move relocations code into the backend and code builder

This commit is contained in:
Brian Carroll 2021-10-30 09:20:16 +01:00
parent 9780cce4dd
commit 2da2e51895
4 changed files with 35 additions and 24 deletions

View file

@ -132,6 +132,7 @@ pub enum OffsetRelocType {
MemoryAddrI64 = 16,
}
#[derive(Debug)]
pub enum RelocationEntry {
Index {
type_id: IndexRelocType,
@ -185,7 +186,7 @@ impl Serialize for RelocationEntry {
pub struct RelocationSection<'a> {
pub name: String,
pub entries: Vec<'a, RelocationEntry>,
pub entries: &'a Vec<'a, RelocationEntry>,
}
impl<'a> Serialize for RelocationSection<'a> {