예제 #1
0
파일: image.py 프로젝트: GaZ3ll3/PeachPy
 def __init__(self, abi):
     from peachpy.formats.macho.file import SegmentCommand, SymbolTableCommand
     from peachpy.formats.macho.section import StringTable, TextSection, ConstSection
     self.abi = abi
     self.segment_command = SegmentCommand(abi)
     self.segment_command.section_count = 0
     self.sections = list()
     text_section = TextSection(abi)
     self.bind_section(text_section)
     const_section = ConstSection(abi)
     self.bind_section(const_section)
     self.symbol_table_command = SymbolTableCommand(abi)
     self.symbols = list()
     self.string_table = StringTable()
예제 #2
0
파일: image.py 프로젝트: pwaller/PeachPy
    def __init__(self, abi):
        from peachpy.formats.macho.section import Segment, TextSection, ConstSection, StringTable, SymbolTable

        self.abi = abi
        self.segments = list()

        self.text_segment = Segment("__TEXT")
        self.add_segment(self.text_segment)

        self.text_section = TextSection()
        self.text_segment.add_section(self.text_section)

        self.const_section = ConstSection()
        self.text_segment.add_section(self.const_section)

        self.string_table = StringTable()
        self.symbol_table = SymbolTable(self.string_table)