package binsec
Module Binsec_sse_loader.ImageSource
Source
type buffer = | Zero| Data of {offset : int;len : int;value : Binsec_kernel.Loader_types.buffer;
}
crop_buffer ~lo ~hi buf creates a new buffer view containing the buf bytes from lo to hi.
Source
val content_reader :
Binsec_kernel.Virtual_address.t ->
Z.t ->
?endianness:Binsec_kernel.Machine.endianness ->
buffer Binsec_kernel.Zmap.t ->
Binsec_kernel.Virtual_address.t Binsec_kernel.Reader.tcontent_reader addr size ~endianness content returns a new Reader of size bytes of content starting from addr.
Sequential accesses are optimized with a cache.
Source
type section = {base : Binsec_kernel.Virtual_address.t;name : string;origin : string;symbols : symbol Binsec_kernel.Zmap.t;
}Source
type t = private {content : buffer Binsec_kernel.Zmap.t;(*set of initialized data
*)protection : protection Binsec_kernel.Zmap.t;(*set of mappings
*)symbols : (Z.t * string) list Binsec_kernel.Dba.Var.Tag.Attribute.Map.t Binsec_kernel.Basic_types.String.Map.t;(*set of symbol attributes
*)layout : section Binsec_kernel.Zmap.t;(*reverse memory paving
*)
}Source
val load :
fs:(string -> Binsec_kernel.Loader_types.buffer) ->
string ->
Binsec_kernel.Loader.Img.t ->
tload ~fs filename img builds a process image for the file filename with the content, permission and symbols from the loader image img.
It uses the virtual file system fs to access extra file contents (e.g. for separated debug or coredump).
Source
val layout_with_cache :
t ->
(Binsec_kernel.Virtual_address.t ->
section)
* (Binsec_kernel.Virtual_address.t ->
symbol)