Skip to content

Commit

Permalink
Error on missing symbol resolution (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlattimore authored Sep 13, 2024
1 parent b3e379c commit 7089cc0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions wild_lib/src/elf_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1603,9 +1603,14 @@ fn apply_relocation(
.symbol(e, false)
.context("Unsupported absolute relocation")?;
let local_symbol_id = object_layout.symbol_id_range.input_to_id(symbol_index);
let Some(resolution) = layout.merged_symbol_resolution(local_symbol_id) else {
return Ok(RelocationModifier::Normal);
};
let resolution = layout
.merged_symbol_resolution(local_symbol_id)
.with_context(|| {
format!(
"Missing resolution for: {}",
layout.symbol_db.symbol_debug(local_symbol_id)
)
})?;

let value_flags = resolution.value_flags;
let resolution_flags = resolution.resolution_flags;
Expand Down

0 comments on commit 7089cc0

Please sign in to comment.