Header menu logo B2R2

B2R2.FrontEnd.BinFile Namespace

Contains APIs for working with the file format of a binary, allowing access to the file metadata and structure.

Type/Module Description

BinCodeMode

Represents an instruction-set encoding mode, or a data region embedded in code.

BinCodeModeMarker

Represents a marker indicating the instruction-set encoding (or data) that takes effect at a given address, for architectures that interleave encodings within a section (notably ARM and Thumb, marked by the ELF $a/$t/$d mapping symbols).

BinExceptionFrame

Represents format-agnostic exception/unwinding information for one function frame, such as a DWARF FDE in ELF/Mach-O or a RUNTIME_FUNCTION in PE x64.

BinExceptionHandler

Represents a guarded code region and the handler it transfers control to on an exception, such as a DWARF call-site/landing-pad pair (ELF/Mach-O) or a PE C++ scope-table entry.

BinFileKind

Represents the high-level kind of a binary file, i.e., what the file is meant to be (a runnable program, a shared library, etc.), independent of the underlying file format.

BinFileOps

Provides convenience operations over optional capabilities of IBinFile.

BinFilePointer

Represents a pointer to binary, which is used to exclusively point to a region of a binary that is (1) mapped to both VM and file, (2) mapped to VM only, or (3) mapped to file only. For the other cases, the pointer is considered invalid (null). The pointer internally holds inclusive ranges of the virtual addresses and the file offsets.

BinImport

Represents an imported symbol resolved through dynamic linking, e.g., a PLT/GOT pair in ELF, an IAT entry in PE, a stub/pointer pair in Mach-O, or an imported entry in Wasm.

BinRelocation

Represents a format-agnostic relocation: a location in the binary image whose contents are patched at link/load time, optionally referencing a symbol and applying a constant addend.

BinSection

Represents a format-agnostic binary section.

BinSectionKind

Represents the kind of a binary section.

BinSegment

Represents a format-agnostic, memory-mapped segment of a binary, i.e., a consecutive region that is mapped into the virtual memory when the binary is loaded.

BinSymbol

Represents a format-agnostic symbol-table entry.

BinSymbolBinding

Represents the linkage binding of a symbol.

BinSymbolKind

Represents a coarse, format-agnostic classification of a symbol.

ELFBinFile

Represents an ELF binary file.

FileFactory

Provides low-level functions to create a binary file object. This is used by the BinHandle module internally, and hence, it is recommended to use the BinHandle module instead, in most cases.

FileFormat (Module)

Provides functions to work with FileFormat.

FileFormat (Type)

Represents the file format of a binary.

FormatDetector

Provides a function to detect the file format of a binary.

IAddressSpace

Represents the address space of a binary file: it maps an address to the raw content, and answers validity and file-mapping queries for addresses.

IBinFile

Represents a format-agnostic binary file interface.

IBinMetadata

Represents an interface for accessing binary file metadata, such as its path, and file format.

IBinProperty

Represents an interface for accessing the basic properties of a binary file.

IBinStructure

Represents the structural view of a binary file, such as its sections and functions.

IExceptionTable

Represents the exception (unwinding) table of a binary file.

IImportTable

Represents an interface for accessing the import table of a binary file, i.e., the linkage table (PLT/GOT, IAT, etc.) that resolves dynamically linked symbols.

IMemoryLayout

Represents the virtual-memory layout of a binary: the set of segments that are mapped into the virtual memory when the binary is loaded. Binary formats without a native VM layout (e.g., bytecode containers) do not provide this interface.

InvalidAddrReadException

Raised when accessing an invalid address of a binary file.

InvalidFileFormatException

Raised when an unexpected file format is detected.

IRelocationTable

Represents an interface for accessing the relocation table in a binary file.

ISymbolTable

Represents the symbol table of a binary file.

MachBinFile

Represents a Mach-O binary file.

NameResolver

Provides helpers for building name resolvers on top of binary-file tables.

PEBinFile

Represents a PE binary file.

Permission (Module)

Provides functions to work with Permission.

Permission (Type)

Represents a file permission. Each permission corresponds to a bit, and thus, multiple permissions can be OR-ed.

PythonBinFile

Represents a Python binary file.

RawBinFile

Represents a raw binary file (containing only binary code and data without file format).

SectionNotFoundException

Raised when a section is not found.

WasmBinFile

Represents a Web Assembly (Wasm) binary file.

Type something to start searching.