package ocaml-solo5
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=47876167068345542f49279e8fd28896
sha512=272081ec51a6ed69c08e4e8fa64fee3df53fd84c66c0c07a653891c88b342cf74553e1c95711e4fbc18922c899a3448a649f3bd9858f8d89cae834ad2b67fffb
doc/compiler-libs.common/Bytesections/index.html
Module Bytesections
module Name : sig ... endRecording sections written to a bytecode executable file
val init_record : out_channel -> toc_writerStart recording sections from the current position in out_channel
val record : toc_writer -> Name.t -> unitRecord the current position in the out_channel as the end of the section with the given name.
val write_toc_and_trailer : toc_writer -> unitWrite the table of contents and the standard trailer for bytecode executable files
Reading sections from a bytecode executable file
type section_entry = {name : Name.t;(*name of the section.
*)pos : int;(*byte offset at which the section starts.
*)len : int;(*length of the section.
*)
}val read_toc : in_channel -> section_tableRead the table of sections from a bytecode executable. Raise Bad_magic_number if magic number doesn't match
val seek_section : section_table -> in_channel -> Name.t -> intPosition the input channel at the beginning of the section named "name", and return the length of that section. Raise Not_found if no such section exists.
val read_section_string : section_table -> in_channel -> Name.t -> stringReturn the contents of a section, as a string.
val read_section_struct : section_table -> in_channel -> Name.t -> 'aReturn the contents of a section, as marshalled data.
val all : section_table -> section_entry listReturns all section_entry from a section_table in increasing position order.
val pos_first_section : section_table -> intReturn the position of the beginning of the first section