Fix generated extab symbol sizes

This commit is contained in:
Luke Street 2023-08-03 19:12:58 -04:00
parent 5c04800964
commit 43856f1b79
1 changed files with 3 additions and 3 deletions

View File

@ -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 = &obj.sections[extabindex_section_idx];
let extabindex_section_index = extabindex_section.index; 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 = &obj.sections[extab_section_idx];
let extab_section_index = extab_section.index; 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 { for entry in &eti_entries {
// Add functions from extabindex entries as known function bounds // Add functions from extabindex entries as known function bounds
@ -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), Some(&b)) => (a.extab_addr, b.extab_addr - a.extab_addr),
(Some(a), None) => ( (Some(a), None) => (
a.extab_addr, 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, _ => break,
}; };