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:
The412Banner committed 2026-11-29 23:04:09 -05:00
1 parent d78ff7ddc7
commit 217817fa83
1 file changed
+8 -3
+8 -3
View File
@@ -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)