package linksem
Install
Dune Dependency
Authors
Maintainers
Sources
md5=2075c56715539b3b8f54ae65cc808b8c
sha512=f7c16e4036a1440a6a8d13707a43f0f9f9db0c68489215f948cc300b6a164dba5bf852e58f89503e9d9f38180ee658d9478156ca1a1ef64d6861eec5f9cf43d2
doc/linksem_zarith/Elf_note/index.html
Module Elf_note
Source
elf_note
contains data types and functions for interpreting the .note * section/segment of an ELF file, and extracting information from that * section/segment.
type elf32_note = {
elf32_note_namesz : Uint32_wrapper.uint32;
(*The size of the name field.
*)elf32_note_descsz : Uint32_wrapper.uint32;
(*The size of the description field.
*)elf32_note_type : Uint32_wrapper.uint32;
(*The type of the note.
*)elf32_note_name : Byte_sequence.byte_sequence0;
(*The byte sequence corresponding to the name string.
*)elf32_note_desc : Byte_sequence.byte_sequence0;
(*The byte sequence corresponding to the desc string.
*)
}
elf32_note
represents the contents of a .note section or segment.
type elf64_note = {
elf64_note_namesz : Uint32_wrapper.uint32;
(*The size of the name field.
*)elf64_note_descsz : Uint32_wrapper.uint32;
(*The size of the description field.
*)elf64_note_type : Uint32_wrapper.uint32;
(*The type of the note.
*)elf64_note_name : Byte_sequence.byte_sequence0;
(*The byte sequence corresponding to the name string.
*)elf64_note_desc : Byte_sequence.byte_sequence0;
(*The byte sequence corresponding to the desc string.
*)
}
elf64_note
represents the contents of a .note section or segment.
Contains copy of prstatus struct
Contains copy of prstatus struct
Contains copy of fpregset struct
Contains copy of fpregset struct
Contains copy of prpsinfo struct
Contains copy of prpsinfo struct
Contains copy of prxregset struct
Contains copy of prxregset struct
Contains copy of task structure
Contains copy of task structure
String from sysinfo(SI_PLATFORM)
String from sysinfo(SI_PLATFORM)
Contains copy of auxv array
Contains copy of auxv array
Contains copy of gwindows struct
Contains copy of gwindows struct
Contains copy of asrset struct
Contains copy of asrset struct
Contains copy of pstatus struct
Contains copy of pstatus struct
Contains copy of psinfo struct
Contains copy of psinfo struct
Contains copy of prcred struct
Contains copy of prcred struct
Contains copy of utsname struct
Contains copy of utsname struct
Contains copy of lwpstatus struct
Contains copy of lwpstatus struct
Contains copy of lwpinfo struct
Contains copy of lwpinfo struct
Contains copy of fprxregset struct
Contains copy of fprxregset struct
Contains copy of siginfo_t, size might increase
Contains copy of siginfo_t, size might increase
Contains information about mapped files
Contains information about mapped files
Contains copy of user_fxsr_struct
Contains copy of user_fxsr_struct
PowerPC Altivec/VMX registers
PowerPC Altivec/VMX registers
PowerPC SPE/EVR registers
PowerPC SPE/EVR registers
PowerPC VSX registers
PowerPC VSX registers
Target Address Register
Target Address Register
Program Priority Register
Program Priority Register
Data Stream Control Register
Data Stream Control Register
Event Based Branch Registers
Event Based Branch Registers
Performance Monitor Registers
Performance Monitor Registers
TM checkpointed GPR Registers
TM checkpointed GPR Registers
TM checkpointed FPR Registers
TM checkpointed FPR Registers
TM checkpointed VMX Registers
TM checkpointed VMX Registers
TM checkpointed VSX Registers
TM checkpointed VSX Registers
TM Special Purpose Registers
TM Special Purpose Registers
TM checkpointed Target Address Register
TM checkpointed Target Address Register
TM checkpointed Program Priority Register
TM checkpointed Program Priority Register
TM checkpointed Data Stream Control Register
TM checkpointed Data Stream Control Register
i386 TLS slots (struct user_desc)
i386 TLS slots (struct user_desc)
x86 io permission bitmap (1=deny)
x86 io permission bitmap (1=deny)
x86 extended state using xsave
x86 extended state using xsave
s390 upper register halves
s390 upper register halves
s390 timer register
s390 timer register
s390 TOD clock comparator register
s390 TOD clock comparator register
s390 TOD programmable register
s390 TOD programmable register
s390 control registers
s390 control registers
s390 prefix register
s390 prefix register
s390 breaking event address
s390 breaking event address
s390 system call restart data
s390 system call restart data
s390 transaction diagnostic block
s390 transaction diagnostic block
ARM VFP/NEON registers
ARM VFP/NEON registers
ARM TLS register
ARM TLS register
ARM hardware breakpoint registers
ARM hardware breakpoint registers
ARM hardware watchpoint registers
ARM hardware watchpoint registers
ARM system call number
ARM system call number
ARM Scalable Vector Extension registers
Contains a version string.
Procstat proc data.
Procstat proc data.
Procstat files data.
Procstat files data.
Procstat vmmap data.
Procstat vmmap data.
Procstat groups data.
Procstat groups data.
Procstat umask data.
Procstat umask data.
Procstat rlimit data.
Procstat rlimit data.
Procstat osreldate data.
Procstat osreldate data.
Procstat ps_strings data.
Procstat ps_strings data.
Procstat auxv data.
type elf64_nt_file_entry = {
elf64_nt_file_entry_start : Uint64_wrapper.uint64;
elf64_nt_file_entry_end : Uint64_wrapper.uint64;
elf64_nt_file_entry_offset : Uint64_wrapper.uint64;
elf64_nt_file_entry_filename : string;
}
elf64_nt_file_entry
represents the contents of a NT_FILE note entry.
type elf64_nt_file = {
elf64_nt_file_count : Uint64_wrapper.uint64;
elf64_nt_file_page_size : Uint64_wrapper.uint64;
elf64_nt_file_entries : elf64_nt_file_entry list;
}
elf64_nt_file
represents the contents of a NT_FILE note.
type elf64_nt_procstat_vmentry = {
elf64_nt_procstat_vmentry_type : Uint32_wrapper.uint32;
(*Type of map entry.
*)elf64_nt_procstat_vmentry_start : Uint64_wrapper.uint64;
(*Starting address.
*)elf64_nt_procstat_vmentry_end : Uint64_wrapper.uint64;
(*Finishing address.
*)elf64_nt_procstat_vmentry_offset : Uint64_wrapper.uint64;
(*Mapping offset in object
*)elf64_nt_procstat_vmentry_vn_fileid : Uint64_wrapper.uint64;
(*inode number if vnode
*)elf64_nt_procstat_vmentry_vn_fsid : Uint32_wrapper.uint32;
(*dev_t of vnode location
*)elf64_nt_procstat_vmentry_flags : Uint32_wrapper.uint32;
(*Flags on map entry.
*)elf64_nt_procstat_vmentry_resident : Uint32_wrapper.uint32;
(*Number of resident pages.
*)elf64_nt_procstat_vmentry_protection : Uint32_wrapper.uint32;
(*Protection bitmask.
*)elf64_nt_procstat_vmentry_ref_count : Uint32_wrapper.uint32;
(*VM obj ref count.
*)elf64_nt_procstat_vmentry_shadow_count : Uint32_wrapper.uint32;
(*VM obj shadow count.
*)elf64_nt_procstat_vmentry_vn_type : Uint32_wrapper.uint32;
(*Vnode type.
*)elf64_nt_procstat_vmentry_vn_size : Uint64_wrapper.uint64;
(*File size.
*)elf64_nt_procstat_vmentry_vn_rdev : Uint32_wrapper.uint32;
(*Device id if device.
*)elf64_nt_procstat_vmentry_vn_mode : Uint32_wrapper.uint32;
(*File mode.
*)elf64_nt_procstat_vmentry_status : Uint32_wrapper.uint32;
(*Status flags.
*)elf64_nt_procstat_vmentry_path : string;
(*Path to VM obj, if any.
*)
}
elf64_nt_procstat_vmentry
represents the contents of a FreeBSD NT_PROCSTAT_VMMAP note entry (see `struct kinfo_vmentry`).
val read_elf32_note :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf32_note * Byte_sequence_wrapper.byte_sequence) Error.error
read_elf32_note endian bs0
transcribes an ELF note section from byte * sequence bs0
assuming endianness endian
. May fail if transcription fails * (i.e. if the byte sequence is not sufficiently long).
val read_elf64_note :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf64_note * Byte_sequence_wrapper.byte_sequence) Error.error
read_elf64_note endian bs0
transcribes an ELF note section from byte * sequence bs0
assuming endianness endian
. May fail if transcription fails * (i.e. if the byte sequence is not sufficiently long).
val read_all_elf32_notes :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
elf32_note list Error.error
val read_all_elf64_notes :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
elf64_note list Error.error
val obtain_elf32_note_sections :
Endianness.endianness ->
Elf_section_header_table.elf32_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
elf32_note list Error.error
obtain_elf32_note_sections endian sht bs0
returns all note sections present * in an ELF file, as indicated by the file's section header table sht
, reading * them from byte sequence bs0
assuming endianness endian
. May fail if * transcription of a note section fails.
val obtain_elf64_note_sections :
Endianness.endianness ->
Elf_section_header_table.elf64_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
elf64_note list Error.error
obtain_elf64_note_sections endian sht bs0
returns all note sections present * in an ELF file, as indicated by the file's section header table sht
, reading * them from byte sequence bs0
assuming endianness endian
. May fail if * transcription of a note section fails.
val obtain_elf32_note_segments :
Endianness.endianness ->
Elf_program_header_table.elf32_program_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
elf32_note list Error.error
obtain_elf32_note_segments endian pht bs0
returns all note segments present * in an ELF file, as indicated by the file's program header table pht
, reading * them from byte sequence bs0
assuming endianness endian
. May fail if * transcription of a note section fails.
val obtain_elf64_note_segments :
Endianness.endianness ->
Elf_program_header_table.elf64_program_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
elf64_note list Error.error
obtain_elf64_note_segments endian pht bs0
returns all note segments present * in an ELF file, as indicated by the file's program header table pht
, reading * them from byte sequence bs0
assuming endianness endian
. May fail if * transcription of a note section fails.
val obtain_elf32_note_section_and_segments :
Endianness.endianness ->
Elf_program_header_table.elf32_program_header_table_entry list ->
Elf_section_header_table.elf32_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
elf32_note list Error.error
obtain_elf32_note_section_and_segments endian pht sht bs0
returns all note * sections and segments present in an ELF file, as indicated by the file's * program header table pht
and section header table sht
, reading * them from byte sequence bs0
assuming endianness endian
. May fail if * transcription of a note section or segment fails.
val obtain_elf64_note_section_and_segments :
Endianness.endianness ->
Elf_program_header_table.elf64_program_header_table_entry list ->
Elf_section_header_table.elf64_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
elf64_note list Error.error
obtain_elf64_note_section_and_segments endian pht sht bs0
returns all note * sections and segments present in an ELF file, as indicated by the file's * program header table pht
and section header table sht
, reading * them from byte sequence bs0
assuming endianness endian
. May fail if * transcription of a note section or segment fails.
name_string_of_elf32_note note
extracts the name string of an ELF note * section, interpreting the section's uninterpreted name field as a string.
name_string_of_elf64_note note
extracts the name string of an ELF note * section, interpreting the section's uninterpreted name field as a string.
val read_elf64_freebsd_note_desc :
Endianness.endianness ->
elf64_note ->
Nat_big_num.num ->
Byte_sequence_wrapper.byte_sequence Error.error
read_freebsd_note_desc
unwraps a FreeBSD note description, checking that the size of
val read_string' :
Byte_sequence_wrapper.byte_sequence ->
(char list * Byte_sequence_wrapper.byte_sequence) Error.error
val read_string :
Byte_sequence_wrapper.byte_sequence ->
(string * Byte_sequence_wrapper.byte_sequence) Error.error
val read_elf64_nt_file_entry :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
string ->
(elf64_nt_file_entry * Byte_sequence_wrapper.byte_sequence) Error.error
val read_elf64_nt_file_entries :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
Byte_sequence_wrapper.byte_sequence ->
elf64_nt_file_entry list Error.error
val read_elf64_nt_file :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
elf64_nt_file Error.error
val read_elf64_nt_procstat_vmentry :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf64_nt_procstat_vmentry * Byte_sequence_wrapper.byte_sequence) Error.error
val read_elf64_nt_procstat_vmmap :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
elf64_nt_procstat_vmentry list Error.error
val read_elf64_nt_procstat_psstrings :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
Uint64_wrapper.uint64 Error.error
type elf64_psstrings = {
elf64_psstrings_argvstr : Uint64_wrapper.uint64;
elf64_psstrings_nargvstr : Uint32_wrapper.uint32;
(*the number of argument strings
*)elf64_psstrings_envstr : Uint64_wrapper.uint64;
elf64_psstrings_nenvstr : Uint32_wrapper.uint32;
(*the number of environment strings
*)
}
elf64_psstrings
is FreeBSD's `struct ps_strings`
val read_elf64_psstrings :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
elf64_psstrings Error.error
type mmap_entry = {
mmap_entry_start : Nat_big_num.num;
mmap_entry_end : Nat_big_num.num;
mmap_entry_offset : Nat_big_num.num;
mmap_entry_path : string;
}
A mmap table entry suitable for both Linux and FreeBSD.
val read_nt_file_entries :
Endianness.endianness ->
elf64_note list ->
mmap_entry list Error.error
val read_nt_procstat_vmmap :
Endianness.endianness ->
elf64_note list ->
mmap_entry list Error.error
val read_all_elf64_nt_auxv :
Endianness.endianness ->
elf64_note list ->
Auxv.elf64_auxv list Error.error