package bap-std

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Input information.

This module abstracts input type.

type t = input
val file : ?loader:string -> filename:string -> t

file ?loader ~filename input data from a file, using the specified loader. If loader is not specified, then some existing loader will be used. If it is specified, then it is first looked up in the available_loaders and if it is not found, then it will be looked up in the Image.available_backends.

val binary : ?base:addr -> arch -> filename:string -> t

binary ?base arch ~filename create an input from a binary file, that is a pure code.

  • parameter base

    is an virtual address of the first byte (defaults to 0).

val create : ?finish:(project -> project) -> arch -> string -> code:value memmap -> data:value memmap -> t

create arch filename ~code ~data creates an input from a file, using two memory maps. The code memmap spans the code in the file, and data spans the data. An optional finish function can be used to propagate to the project any additional information that is available to the loader. It defaults to ident.

val register_loader : string -> (string -> t) -> unit

register_loader name load register a loader under provided name. The load function will be called the filename, and it must return the input value.

val available_loaders : unit -> string list

available_loaders () returns a list of names of currently known loaders.

OCaml

Innovation. Community. Security.