arch refactor + backend ir start
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
use crate::backend::{Addr, elf};
|
||||
|
||||
pub struct LinkedProgram {
|
||||
pub code: Vec<u8>,
|
||||
pub entry: Option<Addr>,
|
||||
}
|
||||
|
||||
impl LinkedProgram {
|
||||
pub fn to_elf(&self) -> Vec<u8> {
|
||||
elf::create(&self.code, self.entry.expect("no start"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user