package binsec
Install
dune-project
Dependency
Authors
-
AAdel Djoudi
-
BBenjamin Farinier
-
CChakib Foulani
-
DDorian Lesbre
-
FFrédéric Recoules
-
GGuillaume Girol
-
JJosselin Feist
-
LLesly-Ann Daniel
-
MMahmudul Faisal Al Ameen
-
MManh-Dung Nguyen
-
MMathéo Vergnolle
-
MMathilde Ollivier
-
MMatthieu Lemerre
-
NNicolas Bellec
-
OOlivier Nicole
-
RRichard Bonichon
-
RRobin David
-
SSébastien Bardin
-
SSoline Ducousso
-
TTa Thanh Dinh
-
YYaëlle Vinçont
-
YYanis Sellami
Maintainers
Sources
sha256=4cf70a0367fef6f33ee3165f05255914513ea0539b94ddfef0bd46fc9b42fa8a
sha512=cd67a5b7617f661a7786bef0c828ee55307cef5260dfecbb700a618be795d81b1ac49fc1a18c4904fd2eb8a182dc862b0159093028651e78e7dc743f5babf9e3
doc/binsec_kernel_loader/Binsec_kernel_loader/Loader_utils/index.html
Module Binsec_kernel_loader.Loader_utilsSource
Loader utility functions
val section_slice_by_name :
string ->
Loader.Img.t ->
Binsec_base.Virtual_address.t * Binsec_base.Virtual_address.tsection_slice section_name img returns the interval lo, hi of virtual addresses defining the section section_name.
val find_section_by_address :
address:Binsec_base.Virtual_address.t ->
Loader.Img.t ->
Loader.Section.t optionval find_section_by_address_exn :
address:Binsec_base.Virtual_address.t ->
Loader.Img.t ->
Loader.Section.tval section_slice_by_address :
address:Binsec_base.Virtual_address.t ->
Loader.Img.t ->
Binsec_base.Virtual_address.t * Binsec_base.Virtual_address.tManipulation of symbols
Functions that are of the form f_by_name call the function symbol_by_name which is costly because it compares all the symbols in the image to the requested name. Use them with parcimony and cache the symbols if they are requested multiple times.
symbol_by_name ~name img Returns Some symbol name in img. If img contains no symbol name, returns None.
address_of_symbol symbol finds Some address where the symbole is defined. Otherwise returns None.
val address_of_symbol_by_name :
name:string ->
Loader.Img.t ->
Binsec_base.Virtual_address.t optionval symbol_interval :
Loader.Symbol.t ->
Binsec_base.Virtual_address.t * Binsec_base.Virtual_address.tsymbol_interval symbol Returns the address range corresponding to symbol
val symbol_interval_by_name :
name:string ->
Loader.Img.t ->
(Binsec_base.Virtual_address.t * Binsec_base.Virtual_address.t) optionbelongs_to_symbol symbol addr Returns true if the address addr is locate in the symbol (i.e. in the range address_of_symbol symbol (included) and address_of_symbol symbol + size_of_symbol symbol_interval (excluded)).
val belongs_to_symbol_by_name :
name:string ->
Loader.Img.t ->
Binsec_base.Virtual_address.t ->
boolval address_of_symbol_or_section_by_name :
name:string ->
Loader.Img.t ->
Binsec_base.Virtual_address.t optionval interval_of_symbol_or_section_by_name :
name:string ->
Loader.Img.t ->
(Binsec_base.Virtual_address.t * Binsec_base.Virtual_address.t) option