pr 59.2
This commit is contained in:
@@ -230,7 +230,6 @@ impl Linker {
|
||||
|
||||
// Final Exports map for ProgramImage (String -> func_idx)
|
||||
// Only including exports from the ROOT project (the last one in build plan usually)
|
||||
// Wait, the requirement says "emit final PBS v0 image".
|
||||
// In PBS v0, exports are name -> func_id.
|
||||
let mut final_exports = HashMap::new();
|
||||
if let Some(root_module) = modules.last() {
|
||||
@@ -241,8 +240,9 @@ impl Linker {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// v0: Fallback export for entrypoint `src/main/modules:frame` (root module)
|
||||
if !final_exports.contains_key("src/main/modules:frame") {
|
||||
if !final_exports.iter().any(|(name, _)| name.ends_with(":frame")) {
|
||||
if let Some(&root_offset) = module_function_offsets.last() {
|
||||
if let Some((idx, _)) = combined_function_names.iter().find(|(i, name)| *i >= root_offset && name == "frame") {
|
||||
final_exports.insert("src/main/modules:frame".to_string(), *idx);
|
||||
|
||||
@@ -67,7 +67,7 @@ fn test_integration_test01_link() {
|
||||
|
||||
let mut vm = VirtualMachine::default();
|
||||
// Use initialize to load the ROM and resolve entrypoint
|
||||
vm.initialize(unit.rom, "src/main/modules:frame").expect("Failed to initialize VM");
|
||||
vm.initialize(unit.rom, "frame").expect("Failed to initialize VM");
|
||||
|
||||
let mut native = SimpleNative;
|
||||
let mut hw = SimpleHardware::new();
|
||||
|
||||
Reference in New Issue
Block a user