mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
fix(upscale): read every export row whatever objdump prints above them
The check skipped two lines after the export table header, but older binutils (CI's) print no column titles there, so the first export (ffxConfigure) was never read.
This commit is contained in:
1 parent
d78ff7ddc7
commit
217817fa83
1 file changed
+8
-3
@@ -51,11 +51,16 @@ def exports(dll, objdump):
|
||||
table = report.split('[Ordinal/Name Pointer] Table', 1)
|
||||
if len(table) != 2:
|
||||
sys.exit(f'{dll}: no export table')
|
||||
# One row per export, "[ 0] +base[ 1] 0000 name" (binutils 2.45) or "[ 0] name" (older): the rows
|
||||
# start with an index in brackets; the column titles some versions print do not.
|
||||
names = []
|
||||
for line in table[1].splitlines()[2:]:
|
||||
for line in table[1].splitlines()[1:]:
|
||||
if not line.strip():
|
||||
break
|
||||
names.append(line.split()[-1])
|
||||
if names:
|
||||
break
|
||||
continue
|
||||
if re.match(r'\s*\[\s*\d+\]', line):
|
||||
names.append(line.split()[-1])
|
||||
if len(names) != len(set(names)):
|
||||
sys.exit(f'{dll}: duplicate exports')
|
||||
return set(names)
|
||||
|
||||
Reference in new issue
Block a user