Skip to content

Commit

Permalink
Check for SHN_UNDEF during symbol dumping (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevaa authored Oct 28, 2024
1 parent b41f577 commit d0b50a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/readelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ def display_symbol_tables(self):
symbol_name = symbol.name
# Print section names for STT_SECTION symbols as readelf does
if (symbol['st_info']['type'] == 'STT_SECTION'
and symbol['st_shndx'] != 'SHN_UNDEF'
and symbol['st_shndx'] < self.elffile.num_sections()
and symbol['st_name'] == 0):
symbol_name = self.elffile.get_section(symbol['st_shndx']).name
Expand Down

0 comments on commit d0b50a2

Please sign in to comment.