Skip to content

Commit

Permalink
o1vm/elf: additional context when pc is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Dec 19, 2024
1 parent 09d4ce0 commit 37fc346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion o1vm/src/elf_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub fn parse_riscv32(path: &Path) -> Result<State, String> {

// Entry point of the program
let pc: u32 = file.ehdr.e_entry as u32;
assert!(pc != 0, "Entry point is 0. The documentation of the ELF library says that it means the ELF doesn't have an entry point. This is not supported.");
assert!(pc != 0, "Entry point is 0. The documentation of the ELF library says that it means the ELF doesn't have an entry point. This is not supported. This can happen if the binary given is an object file and not an executable file. You might need to call the linker (ld) before running the binary.");
let next_pc: u32 = pc + 4u32;

let state = State {
Expand Down

0 comments on commit 37fc346

Please sign in to comment.