from .structs import ELFStructs
from .sections import (
Section, StringTableSection, SymbolTableSection,
- SUNWSyminfoTableSection, VerneedTableSection,
- VerdefTableSection, VersymTableSection,
+ SUNWSyminfoTableSection, GNUVerNeedTableSection,
+ GNUVerDefTableSection, GNUVerSymTableSection,
NullSection)
from .dynamic import DynamicSection, DynamicSegment
from .relocation import RelocationSection, RelocationHandler
elif sectype == 'SHT_SUNW_syminfo':
return self._make_sunwsyminfo_table_section(section_header, name)
elif sectype == 'SHT_GNU_verneed':
- return self._make_verneed_table_section(section_header, name)
+ return self._make_gnu_verneed_section(section_header, name)
elif sectype == 'SHT_GNU_verdef':
- return self._make_verdef_table_section(section_header, name)
+ return self._make_gnu_verdef_section(section_header, name)
elif sectype == 'SHT_GNU_versym':
- return self._make_versym_table_section(section_header, name)
+ return self._make_gnu_versym_section(section_header, name)
elif sectype in ('SHT_REL', 'SHT_RELA'):
return RelocationSection(
section_header, name, self.stream, self)
elffile=self,
symboltable=strtab_section)
- def _make_verneed_table_section(self, section_header, name):
- """ Create a VerneedTableSection
+ def _make_gnu_verneed_section(self, section_header, name):
+ """ Create a GNUVerNeedTableSection
"""
linked_strtab_index = section_header['sh_link']
strtab_section = self.get_section(linked_strtab_index)
- return VerneedTableSection(
+ return GNUVerNeedTableSection(
section_header, name, self.stream,
elffile=self,
stringtable=strtab_section)
- def _make_verdef_table_section(self, section_header, name):
- """ Create a VerdefTableSection
+ def _make_gnu_verdef_section(self, section_header, name):
+ """ Create a GNUVerDefTableSection
"""
linked_strtab_index = section_header['sh_link']
strtab_section = self.get_section(linked_strtab_index)
- return VerdefTableSection(
+ return GNUVerDefTableSection(
section_header, name, self.stream,
elffile=self,
stringtable=strtab_section)
- def _make_versym_table_section(self, section_header, name):
- """ Create a VersymTableSection
+ def _make_gnu_versym_section(self, section_header, name):
+ """ Create a GNUVerSymTableSection
"""
linked_strtab_index = section_header['sh_link']
strtab_section = self.get_section(linked_strtab_index)
- return VersymTableSection(
+ return GNUVerSymTableSection(
section_header, name, self.stream,
elffile=self,
symboltable=strtab_section)
"""
return self.entry[name]
-class VerneedTableSection(Section):
+class GNUVerNeedTableSection(Section):
""" ELF SUNW or GNU Version Needed table section.
Has an associated StringTableSection that's passed in the constructor.
"""
def __init__(self, header, name, stream, elffile, stringtable):
- super(VerneedTableSection, self).__init__(header, name, stream)
+ super(GNUVerNeedTableSection, self).__init__(header, name, stream)
self.elffile = elffile
self.elfstructs = self.elffile.structs
self.stringtable = stringtable
entry_offset += entry['vn_next']
-class VerdefTableSection(Section):
+class GNUVerDefTableSection(Section):
""" ELF SUNW or GNU Version Definition table section.
Has an associated StringTableSection that's passed in the constructor.
"""
def __init__(self, header, name, stream, elffile, stringtable):
- super(VerdefTableSection, self).__init__(header, name, stream)
+ super(GNUVerDefTableSection, self).__init__(header, name, stream)
self.elffile = elffile
self.elfstructs = self.elffile.structs
self.stringtable = stringtable
entry_offset += entry['vd_next']
-class VersymTableSection(Section):
+class GNUVerSymTableSection(Section):
""" ELF SUNW or GNU Versym table section.
Has an associated SymbolTableSection that's passed in the constructor.
"""
def __init__(self, header, name, stream, elffile, symboltable):
- super(VersymTableSection, self).__init__(header, name, stream)
+ super(GNUVerSymTableSection, self).__init__(header, name, stream)
self.elffile = elffile
self.elfstructs = self.elffile.structs
self.symboltable = symboltable
from elftools.elf.enums import ENUM_D_TAG
from elftools.elf.segments import InterpSegment
from elftools.elf.sections import (
- SymbolTableSection, VersymTableSection,
- VerdefTableSection, VerneedTableSection,
+ SymbolTableSection, GNUVerSymTableSection,
+ GNUVerDefTableSection, GNUVerNeedTableSection,
)
from elftools.elf.relocation import RelocationSection
from elftools.elf.descriptions import (
return
for section in self.elffile.iter_sections():
- if isinstance(section, VersymTableSection):
+ if isinstance(section, GNUVerSymTableSection):
self._print_version_section_header(
section, 'Version symbols', lead0x=False)
self._emitline()
- elif isinstance(section, VerdefTableSection):
+ elif isinstance(section, GNUVerDefTableSection):
self._print_version_section_header(
section, 'Version definition', indent=2)
offset += verdef['vd_next']
- elif isinstance(section, VerneedTableSection):
+ elif isinstance(section, GNUVerNeedTableSection):
self._print_version_section_header(section, 'Version needs')
'verneed': None, 'type': None }
for section in self.elffile.iter_sections():
- if isinstance(section, VersymTableSection):
+ if isinstance(section, GNUVerSymTableSection):
self._versioninfo['versym'] = section
- elif isinstance(section, VerdefTableSection):
+ elif isinstance(section, GNUVerDefTableSection):
self._versioninfo['verdef'] = section
- elif isinstance(section, VerneedTableSection):
+ elif isinstance(section, GNUVerNeedTableSection):
self._versioninfo['verneed'] = section
elif isinstance(section, DynamicSection):
for tag in section.iter_tags():