get_elf_map: do not reprocess members twice

This commit is contained in:
Yuri D'Elia 2021-06-05 16:49:45 +02:00 committed by DRracer
parent 615e8575bb
commit 1d82d2da64

View File

@ -145,7 +145,8 @@ def get_elf_globals(path, expand_structs, struct_gaps=True):
# fill gaps in the middle
members = list(sorted(members, key=lambda x: x.off))
last_end = 0
for member in members:
for n in range(len(members)):
member = members[n]
if member.off > last_end:
members.append(Member('*UNKNOWN*', last_end, member.off - last_end))
last_end = member.off + member.size