Skip to content

Commit

Permalink
Merge pull request #2885 from o1-labs/dw/o1vm-additional-error-msg
Browse files Browse the repository at this point in the history
o1vm/elf: additional context when pc is 0
  • Loading branch information
dannywillems authored Dec 23, 2024
2 parents d1e0008 + 37fc346 commit 3540f19
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 3540f19

Please sign in to comment.