package owee
-
owee
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Minimalist ELF 64 decoder
type identification = {
elf_class : Owee_buf.u8;
elf_data : Owee_buf.u8;
elf_version : Owee_buf.u8;
elf_osabi : Owee_buf.u8;
elf_abiversion : Owee_buf.u8;
}
type header = {
e_ident : identification;
e_type : Owee_buf.u16;
e_machine : Owee_buf.u16;
e_version : Owee_buf.u32;
e_entry : Owee_buf.u64;
e_phoff : Owee_buf.u64;
e_shoff : Owee_buf.u64;
e_flags : Owee_buf.u32;
e_ehsize : Owee_buf.u16;
e_phentsize : Owee_buf.u16;
e_phnum : Owee_buf.u16;
e_shentsize : Owee_buf.u16;
e_shnum : Owee_buf.u16;
e_shstrndx : Owee_buf.u16;
}
type section = {
sh_name : Owee_buf.u32;
sh_type : Owee_buf.u32;
sh_flags : Owee_buf.u64;
sh_addr : Owee_buf.u64;
sh_offset : Owee_buf.u64;
sh_size : Owee_buf.u64;
sh_link : Owee_buf.u32;
sh_info : Owee_buf.u32;
sh_addralign : Owee_buf.u64;
sh_entsize : Owee_buf.u64;
sh_name_str : string;
}
val read_elf : Owee_buf.t -> header * section array
From a buffer pointing to an ELF image, read_elf
decodes the header and section table.
val section_body : Owee_buf.t -> section -> Owee_buf.t
From a buffer pointing to an ELF image, section_body elf section
returns a sub-buffer with the contents of the section
of the ELF image.
Convenience function to find a section in the section table given its name.
val find_section_body :
Owee_buf.t ->
section array ->
section_name:string ->
Owee_buf.t option
From a buffer pointing to an ELF image, find the body of a section given its name.
val debug_line_pointers :
Owee_buf.t ->
section array ->
Owee_debug_line.pointers_to_other_sections
module String_table : sig ... end
val find_string_table : Owee_buf.t -> section array -> String_table.t option
Fish out the string table from the given ELF buffer and section array.
module Symbol_table : sig ... end
val find_symbol_table : Owee_buf.t -> section array -> Symbol_table.t option
Fish out both the dynamic and static symbol tables (.dynsym and .symtab) from the given ELF buffer and section array.