Skip to content

Commit

Permalink
Fix generated extab symbol sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Aug 3, 2023
1 parent 5c04800 commit 43856f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/dol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ pub fn process_dol<P: AsRef<Path>>(path: P) -> Result<ObjInfo> {
{
let extabindex_section = &obj.sections[extabindex_section_idx];
let extabindex_section_index = extabindex_section.index;
let extabindex_section_address = extabindex_section.address;
let extabindex_section_size = extabindex_section.size;
let extab_section = &obj.sections[extab_section_idx];
let extab_section_index = extab_section.index;
let extab_section_address = extab_section.address;
let extab_section_size = extab_section.size;

for entry in &eti_entries {
// Add functions from extabindex entries as known function bounds
Expand Down Expand Up @@ -440,7 +440,7 @@ pub fn process_dol<P: AsRef<Path>>(path: P) -> Result<ObjInfo> {
(Some(a), Some(&b)) => (a.extab_addr, b.extab_addr - a.extab_addr),
(Some(a), None) => (
a.extab_addr,
(extabindex_section_address + extabindex_section_size) as u32 - a.extab_addr,
(extab_section_address + extab_section_size) as u32 - a.extab_addr,
),
_ => break,
};
Expand Down

0 comments on commit 43856f1

Please sign in to comment.