Skip to content

Commit

Permalink
Fix rodata split detection issue related to jumptables and strings
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Oct 12, 2024
1 parent 75677b9 commit 067b1ae
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions spimdisasm/mips/sections/MipsSectionRodata.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,14 @@ def analyze(self) -> None:
# doubles require a bit extra of alignment
if previousSymbolExtraPadding >= 2:
self.fileBoundaries.append(sym.inFileOffset)
elif sym.isJumpTable() and common.GlobalConfig.COMPILER.value.prevAlign_jumptable is not None and common.GlobalConfig.COMPILER.value.prevAlign_jumptable >= 3:
if previousSymbolExtraPadding >= 2:
self.fileBoundaries.append(sym.inFileOffset)
elif sym.isString() and common.GlobalConfig.COMPILER.value.prevAlign_string is not None and common.GlobalConfig.COMPILER.value.prevAlign_string >= 3:
if previousSymbolExtraPadding >= 2:
self.fileBoundaries.append(sym.inFileOffset)
elif sym.isJumpTable():
if common.GlobalConfig.COMPILER.value.prevAlign_jumptable is not None and common.GlobalConfig.COMPILER.value.prevAlign_jumptable >= 3:
if previousSymbolExtraPadding >= 2:
self.fileBoundaries.append(sym.inFileOffset)
elif sym.isString():
if common.GlobalConfig.COMPILER.value.prevAlign_string is not None and common.GlobalConfig.COMPILER.value.prevAlign_string >= 3:
if previousSymbolExtraPadding >= 2:
self.fileBoundaries.append(sym.inFileOffset)
else:
self.fileBoundaries.append(sym.inFileOffset)

Expand Down

0 comments on commit 067b1ae

Please sign in to comment.