From 37fc3464a40529d9df0f5227f9e8754645941881 Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Thu, 19 Dec 2024 18:45:16 +0100 Subject: [PATCH] o1vm/elf: additional context when pc is 0 --- o1vm/src/elf_loader.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/o1vm/src/elf_loader.rs b/o1vm/src/elf_loader.rs index 0fc26a4788..ecdaf895fe 100644 --- a/o1vm/src/elf_loader.rs +++ b/o1vm/src/elf_loader.rs @@ -115,7 +115,7 @@ pub fn parse_riscv32(path: &Path) -> Result { // 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 {