Skip to content

Commit

Permalink
Fix loading
Browse files Browse the repository at this point in the history
  • Loading branch information
toolCHAINZ committed Oct 16, 2024
1 parent faa8c40 commit 0bd3e0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jingle_sleigh/src/context/image/gimli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ impl<'a, 'b> TryFrom<Section<'a, 'b>> for OwnedSection {
}
}

#[derive(Debug)]
pub struct OwnedFile {
sections: Vec<OwnedSection>,
}
Expand All @@ -54,7 +55,7 @@ impl ImageProvider for OwnedFile {
let output_start_addr = vn.offset as usize;
let output_end_addr = output_start_addr + vn.size;
if let Some(x) = self.get_section_info().find(|s| {
output_start_addr > s.base_address
output_start_addr >= s.base_address
&& output_start_addr < (s.base_address + s.data.len())
}) {
let input_start_addr = x.base_address;
Expand Down Expand Up @@ -93,7 +94,7 @@ impl<'a> ImageProvider for File<'a> {
let output_start_addr = vn.offset as usize;
let output_end_addr = output_start_addr + vn.size;
if let Some(x) = self.sections().find(|s| {
output_start_addr > s.address() as usize
output_start_addr >= s.address() as usize
&& output_start_addr < (s.address() + s.size()) as usize
}) {
if let Ok(data) = x.data() {
Expand Down

0 comments on commit 0bd3e0c

Please sign in to comment.