ltvm: remove unneccesary symbol table

(handled in linker now)
This commit is contained in:
Michael Sippel 2024-10-21 11:51:49 +02:00
parent 45869fdd30
commit a948b53d9a
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -25,24 +25,12 @@ fn main() {
let mut vm = tisc::VM::new( args.memsize );
let mut linker = tisc::Linker::new();
let mut symbols = std::collections::HashMap::<String, tisc::LinkAddr>::new();
for source_path in args.sources.iter() {
let mut input = std::io::BufReader::new(
std::fs::File::open(source_path).expect("Failed to open file")
);
let obj_file : tisc::linker::ObjectFile = bincode::deserialize_from( input ).expect("");
for (name, addr) in obj_file.symbols.iter() {
symbols.insert(
name.clone(),
tisc::LinkAddr::Relative{
symbol: source_path.clone(),
offset: *addr
}
);
}
linker.import( source_path, obj_file );
}