コード例 #1
0
    def __init__(self, output_path, abi, input_path=None):
        from peachpy.formats.elf.image import Image
        from peachpy.formats.elf.section import TextSection

        self.output_path = output_path
        self.previous_writer = None
        self.abi = abi
        self.image = Image(abi, input_path)
        self.text_section = TextSection(abi)
        self.image.bind_section(self.text_section, ".text")
コード例 #2
0
ファイル: writer.py プロジェクト: moneytech/PeachPy
    def __init__(self, output_path, abi, input_path=None):
        from peachpy.formats.mscoff import Image, TextSection, ReadOnlyDataSection

        self.output_path = output_path
        self.previous_writer = None
        self.abi = abi
        self.image = Image(abi, input_path)
        self.text_section = TextSection()
        self.image.add_section(self.text_section)
        self.rdata_section = ReadOnlyDataSection()
        self.image.add_section(self.rdata_section)
コード例 #3
0
ファイル: writer.py プロジェクト: staugust/PeachPy
    def __init__(self, output_path, abi, input_path=None):
        super(ELFWriter, self).__init__(output_path)
        from peachpy.formats.elf.image import Image
        from peachpy.formats.elf.section import TextSection

        self.abi = abi
        self.image = Image(abi, input_path)
        self.text_section = TextSection()
        self.image.add_section(self.text_section)
        self.text_rela_section = None
        self.rodata_section = None
コード例 #4
0
    def __init__(self, output_path, abi, input_path=None):
        super(MSCOFFWriter, self).__init__(output_path)

        from peachpy.formats.mscoff import Image, TextSection, ReadOnlyDataSection

        self.output_path = output_path
        self.abi = abi
        self.image = Image(abi, input_path)
        self.text_section = TextSection()
        self.image.add_section(self.text_section)
        self.rdata_section = ReadOnlyDataSection()
        self.image.add_section(self.rdata_section)
コード例 #5
0
    def __init__(self, output_path, abi, input_path=None):
        super(ELFWriter, self).__init__(output_path)
        from peachpy.formats.elf.image import Image
        from peachpy.formats.elf.section import TextSection, ProgramBitsSection

        self.abi = abi
        self.image = Image(abi, input_path)
        self.text_section = TextSection()
        self.image.add_section(self.text_section)
        self.gnu_stack_section = ProgramBitsSection(".note.GNU-stack", allocate=False)
        self.image.add_section(self.gnu_stack_section)
        self.text_rela_section = None
        self.rodata_section = None