Skip to content

Commit

Permalink
Improve missing ELF symbol error message
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Aug 27, 2024
1 parent bfcba00 commit 1f46617
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tool/microkit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,15 @@ pub fn pd_write_symbols(

for (setvar_idx, setvar) in pd.setvars.iter().enumerate() {
let value = pd_setvar_values[i][setvar_idx];
elf.write_symbol(&setvar.symbol, &value.to_le_bytes())?;
let result = elf.write_symbol(&setvar.symbol, &value.to_le_bytes());
if let Err(err) = result {
return Err(format!(
"{} in ELF '{}' for PD '{}'",
err,
pd.program_image.display(),
pd.name
));
}
}
}

Expand Down

0 comments on commit 1f46617

Please sign in to comment.