Skip to content

Commit

Permalink
Fix and enhance DisplaySection
Browse files Browse the repository at this point in the history
  • Loading branch information
marxin authored and davidlattimore committed Aug 30, 2024
1 parent a63f24f commit 7f74205
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions linker-diff/src/section_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<'data> DisplaySection<'data> {
fn new(info: &SectionInfo, files: &'data [InputFile]) -> Self {
Self {
info: info.clone(),
file: &files[info.section_index],
file: &files[info.file_index],
}
}
}
Expand All @@ -157,8 +157,10 @@ impl Display for DisplaySection<'_> {
{
write!(
f,
"section `{section_name}` (0x{:x}..0x{:x})",
self.info.addresses.start, self.info.addresses.end
"section `{section_name}` (0x{:x}..0x{:x}) ({})",
self.info.addresses.start,
self.info.addresses.end,
self.file.filename.to_string_lossy()
)?;
}
Ok(())
Expand Down

0 comments on commit 7f74205

Please sign in to comment.