Skip to content

Commit 343d085

Browse files
committed
Do not add undefined symbols
1 parent bcd210a commit 343d085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pwnlib/elf/elf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ def _populate_symbols(self):
908908
continue
909909

910910
for symbol in _iter_symbols(section):
911-
if not symbol.name:
911+
if not symbol.name or symbol.entry.st_shndx == 'SHN_UNDEF':
912912
continue
913913
self.symbols[symbol.name] = symbol.entry.st_value
914914

0 commit comments

Comments
 (0)