mirror of
https://github.com/elliotnunn/tbxi-patches.git
synced 2024-05-28 14:41:26 +00:00
Survive n(loader sections) != 1
This commit is contained in:
parent
098ed93e93
commit
d70ad36327
|
@ -425,6 +425,8 @@ def dump_lowlevel(basepath):
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_relocations():
|
def get_relocations():
|
||||||
|
relocations = []
|
||||||
|
|
||||||
for idx in range(relocSectionCount):
|
for idx in range(relocSectionCount):
|
||||||
ofs = 56 + 24 * importedLibraryCount + 4 * totalImportedSymbolCount + 12 * idx
|
ofs = 56 + 24 * importedLibraryCount + 4 * totalImportedSymbolCount + 12 * idx
|
||||||
sectionIndex, _, relocCount, firstRelocOffset, = struct.unpack_from('>HHLL', loader, ofs)
|
sectionIndex, _, relocCount, firstRelocOffset, = struct.unpack_from('>HHLL', loader, ofs)
|
||||||
|
@ -445,8 +447,6 @@ def dump_lowlevel(basepath):
|
||||||
if len(section_list) >= 2 and _sec_kind_is_instantiated(section_list[1]['sectionKind']):
|
if len(section_list) >= 2 and _sec_kind_is_instantiated(section_list[1]['sectionKind']):
|
||||||
sectionD = section_list[1]['filename']
|
sectionD = section_list[1]['filename']
|
||||||
|
|
||||||
relocations = []
|
|
||||||
|
|
||||||
def nextblock():
|
def nextblock():
|
||||||
if not data: return None
|
if not data: return None
|
||||||
x = data.pop(0)
|
x = data.pop(0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user