pecoff-0.1: Parser for PE/COFF format.

Data.Pecoff

Description

Parses a ByteString into a Pecoff record. Parsing of section data currently left as a todo.

Synopsis

Documentation

data Pecoff Source

Constructors

Pecoff 

Fields

pMachine :: IMAGE_FILE_MACHINE

Machine type.

pFileCharacteristics :: [IMAGE_FILE_CHARACTERISTICS]

File flags.

pEntryPointAddress :: Word64

Entry point address.

pImageBase :: Word64

Default load base for image.

pSubsystem :: IMAGE_SUBSYSTEM

Subsystem required to run this image.

pDllCharacteristics :: [IMAGE_DLL_CHARACTERISTICS]

DLL flags.

pSections :: [PecoffSection]

Sections contained in this PE/COFF object.

Instances

data PecoffSection Source

Constructors

PecoffSection 

Fields

psectName :: String

Name of section.

psectVirtualSize :: Word64

Virtual memory size.

psectVirtualAddress :: Word64

Virtual memory address.

psectCharacteristics :: [IMAGE_SCN_CHARACTERISTICS]

Flags.

psectRelocations :: ByteString

Raw data for relocations.

psectLinenumbers :: ByteString

Raw data for linenumbers.

psectRawData :: ByteString

Raw data for section.

parsePecoff :: ByteString -> PecoffSource

Parse the ByteString of a PE/COFF file into a Pecoff record.