package linksem
Install
Dune Dependency
Authors
Maintainers
Sources
md5=2075c56715539b3b8f54ae65cc808b8c
sha512=f7c16e4036a1440a6a8d13707a43f0f9f9db0c68489215f948cc300b6a164dba5bf852e58f89503e9d9f38180ee658d9478156ca1a1ef64d6861eec5f9cf43d2
doc/linksem_zarith/Elf_section_header_table/index.html
Module Elf_section_header_table
Source
elf_section_header_table
provides types, functions and other definitions * for working with section header tables and their entries.
Special section indices.
See elf_header.lem for shn_undef
shn_loreserve
: this specifies the lower bound of the range of reserved * indices.
shn_loproc
: start of the range reserved for processor-specific semantics.
shn_loproc
: start of the range reserved for processor-specific semantics.
shn_hiproc
: end of the range reserved for processor-specific semantics.
shn_hiproc
: end of the range reserved for processor-specific semantics.
shn_loos
: start of the range reserved for operating system-specific * semantics.
shn_loos
: start of the range reserved for operating system-specific * semantics.
shn_hios
: end of the range reserved for operating system-specific * semantics.
shn_hios
: end of the range reserved for operating system-specific * semantics.
shn_abs
: specifies the absolute values for the corresponding reference. * Symbols defined relative to section number shn_abs
have absolute values * and are not affected by relocation.
shn_abs
: specifies the absolute values for the corresponding reference. * Symbols defined relative to section number shn_abs
have absolute values * and are not affected by relocation.
shn_common
: symbols defined relative to this index are common symbols, * such as unallocated C external variables.
shn_common
: symbols defined relative to this index are common symbols, * such as unallocated C external variables.
See elf_header.lem for shn_xindex.
shn_hireserve
: specifies the upper-bound of reserved values.
string_of_special_section_index m
produces a string-based representation * of a section header entry's special section index, m
.
Section types.
Marks the section header as being inactive.
Section holds information defined by the program.
Section holds information defined by the program.
The following two section types hold a symbol table. An object file may only * have one symbol table of each of the respective types. The symtab provides * a place for link editing, whereas the dynsym section holds a minimal set of * dynamic linking symbols
The following two section types hold a symbol table. An object file may only * have one symbol table of each of the respective types. The symtab provides * a place for link editing, whereas the dynsym section holds a minimal set of * dynamic linking symbols
Section holds a string table
Section holds a string table
Section holds relocation entries with explicit addends. An object file may * have multiple section of this type.
Section holds relocation entries with explicit addends. An object file may * have multiple section of this type.
Section holds a symbol hash table. An object file may only have a single * hash table.
Section holds a symbol hash table. An object file may only have a single * hash table.
Section holds information for dynamic linking. An object file may only have * a single dynamic section.
Section holds information for dynamic linking. An object file may only have * a single dynamic section.
Section holds information that marks the file in some way.
Section holds information that marks the file in some way.
Section occupies no space in the file but otherwise resembles a progbits * section.
Section occupies no space in the file but otherwise resembles a progbits * section.
Section holds relocation entries without explicit addends. An object file * may have multiple section of this type.
Section holds relocation entries without explicit addends. An object file * may have multiple section of this type.
Section type is reserved but has an unspecified meaning.
Section type is reserved but has an unspecified meaning.
Section contains an array of pointers to initialisation functions. Each * pointer is taken as a parameterless function with a void return type.
Section contains an array of pointers to initialisation functions. Each * pointer is taken as a parameterless function with a void return type.
Section contains an array of pointers to termination functions. Each * pointer is taken as a parameterless function with a void return type.
Section contains an array of pointers to termination functions. Each * pointer is taken as a parameterless function with a void return type.
Section contains an array of pointers to initialisation functions that are * invoked before all other initialisation functions. Each * pointer is taken as a parameterless function with a void return type.
Section contains an array of pointers to initialisation functions that are * invoked before all other initialisation functions. Each * pointer is taken as a parameterless function with a void return type.
Section defines a section group, i.e. a set of sections that are related and * must be treated especially by the linker. May only appear in relocatable * objects.
Section defines a section group, i.e. a set of sections that are related and * must be treated especially by the linker. May only appear in relocatable * objects.
Section is associated with sections of type SHT_SYMTAB and is required if * any of the section header indices referenced by that symbol table contains * the escape value SHN_XINDEX. * * FIXME: Lem bug as int
type used throughout Lem codebase, rather than * BigInt.t
, so Lem chokes on these large constants below, hence the weird * way in which they are written.
Section is associated with sections of type SHT_SYMTAB and is required if * any of the section header indices referenced by that symbol table contains * the escape value SHN_XINDEX. * * FIXME: Lem bug as int
type used throughout Lem codebase, rather than * BigInt.t
, so Lem chokes on these large constants below, hence the weird * way in which they are written.
The following ranges are reserved solely for OS-, processor- and user- * specific semantics, respectively.
val string_of_section_type :
(Nat_big_num.num -> string) ->
(Nat_big_num.num -> string) ->
(Nat_big_num.num -> string) ->
Nat_big_num.num ->
string
string_of_section_type os proc user i
produces a string-based representation * of section type i
. Some section types are defined by ABI-specific supplements * in reserved ranges, in which case the functions os
, proc
and user
are * used to produce the string.
Section flag numeric values.
The section contains data that should be writable during program execution.
The section occupies memory during program execution.
The section occupies memory during program execution.
The section contains executable instructions.
The section contains executable instructions.
The data in the section may be merged to reduce duplication. Each section * is compared based on name, type and flags set with sections with identical * values at run time being mergeable.
The data in the section may be merged to reduce duplication. Each section * is compared based on name, type and flags set with sections with identical * values at run time being mergeable.
The section contains null-terminated character strings.
The section contains null-terminated character strings.
The info
field of this section header contains a section header table * index.
The info
field of this section header contains a section header table * index.
Adds special link ordering for link editors.
Adds special link ordering for link editors.
This section requires special OS-specific processing beyond the standard * link rules.
This section requires special OS-specific processing beyond the standard * link rules.
This section is a member (potentially the only member) of a link group.
This section is a member (potentially the only member) of a link group.
This section contains Thread Local Storage (TLS) meaning that each thread of * execution has its own instance of this data.
This section contains Thread Local Storage (TLS) meaning that each thread of * execution has its own instance of this data.
This section contains compressed data. Compressed data may not be marked as * allocatable.
This section contains compressed data. Compressed data may not be marked as * allocatable.
All bits included in these masks are reserved for OS and processor specific * semantics respectively.
All bits included in these masks are reserved for OS and processor specific * semantics respectively.
string_of_section_flags os proc f
produces a string based representation * of section flag f
. Some section flags are defined by the ABI and are in * reserved ranges, in which case the flag string is produced by functions * os
and proc
. * TODO: add more as validation tests require them.
Section compression.
type elf32_compression_header = {
elf32_chdr_type : Uint32_wrapper.uint32;
(*Specifies the compression algorithm
*)elf32_chdr_size : Uint32_wrapper.uint32;
(*Size in bytes of the uncompressed data
*)elf32_chdr_addralign : Uint32_wrapper.uint32;
(*Specifies the required alignment of the uncompressed data
*)
}
Type elf32_compression_header
provides information about the compression and * decompression of compressed sections. All compressed sections on ELF32 begin * with an elf32_compression_header
entry.
type elf64_compression_header = {
elf64_chdr_type : Uint32_wrapper.uint32;
(*Specified the compression algorithm
*)elf64_chdr_reserved : Uint32_wrapper.uint32;
(*Reserved.
*)elf64_chdr_size : Uint64_wrapper.uint64;
(*Size in bytes of the uncompressed data
*)elf64_chdr_addralign : Uint64_wrapper.uint64;
(*Specifies the required alignment of the uncompressed data
*)
}
Type elf64_compression_header
provides information about the compression and * decompression of compressed sections. All compressed sections on ELF64 begin * with an elf64_compression_header
entry.
This section is compressed with the ZLIB algorithm. The compressed data begins * at the first byte immediately following the end of the compression header.
Values in these ranges are reserved for OS-specific semantics.
Values in these ranges are reserved for processor-specific semantics.
val read_elf32_compression_header :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf32_compression_header * Byte_sequence_wrapper.byte_sequence) Error.error
read_elf32_compression_header ed bs0
reads an elf32_compression_header
* entry from byte sequence bs0
, interpreting bs0
with endianness ed
. * Also returns the suffix of bs0
after reading in the compression header. * Fails if the header cannot be read.
val read_elf64_compression_header :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf64_compression_header * Byte_sequence_wrapper.byte_sequence) Error.error
read_elf64_compression_header ed bs0
reads an elf64_compression_header
* entry from byte sequence bs0
, interpreting bs0
with endianness ed
. * Also returns the suffix of bs0
after reading in the compression header. * Fails if the header cannot be read.
Section header table entry type.
type elf32_section_header_table_entry = {
elf32_sh_name : Uint32_wrapper.uint32;
(*Name of the section
*)elf32_sh_type : Uint32_wrapper.uint32;
(*Type of the section and its semantics
*)elf32_sh_flags : Uint32_wrapper.uint32;
(*Flags associated with the section
*)elf32_sh_addr : Uint32_wrapper.uint32;
(*Address of first byte of section in memory image
*)elf32_sh_offset : Uint32_wrapper.uint32;
(*Offset from beginning of file of first byte of section
*)elf32_sh_size : Uint32_wrapper.uint32;
(*Section size in bytes
*)elf32_sh_link : Uint32_wrapper.uint32;
(*Section header table index link
*)elf32_sh_info : Uint32_wrapper.uint32;
(*Extra information, contents depends on type of section
*)elf32_sh_addralign : Uint32_wrapper.uint32;
(*Alignment constraints for section
*)elf32_sh_entsize : Uint32_wrapper.uint32;
(*Size of each entry in table, if section is one
*)
}
elf32_section_header_table_entry
is the type of entries in the section * header table in 32-bit ELF files. Each entry in the table details a section * in the body of the ELF file.
val compare_elf32_section_header_table_entry :
elf32_section_header_table_entry ->
elf32_section_header_table_entry ->
int
compare_elf32_section_header_table_entry ent1 ent2
is an ordering comparison * function on section header table entries suitable for use in constructing * sets, finite maps and other ordered data types.
val instance_Basic_classes_Ord_Elf_section_header_table_elf32_section_header_table_entry_dict :
elf32_section_header_table_entry Lem_basic_classes.ord_class
type elf64_section_header_table_entry = {
elf64_sh_name : Uint32_wrapper.uint32;
(*Name of the section
*)elf64_sh_type : Uint32_wrapper.uint32;
(*Type of the section and its semantics
*)elf64_sh_flags : Uint64_wrapper.uint64;
(*Flags associated with the section
*)elf64_sh_addr : Uint64_wrapper.uint64;
(*Address of first byte of section in memory image
*)elf64_sh_offset : Uint64_wrapper.uint64;
(*Offset from beginning of file of first byte of section
*)elf64_sh_size : Uint64_wrapper.uint64;
(*Section size in bytes
*)elf64_sh_link : Uint32_wrapper.uint32;
(*Section header table index link
*)elf64_sh_info : Uint32_wrapper.uint32;
(*Extra information, contents depends on type of section
*)elf64_sh_addralign : Uint64_wrapper.uint64;
(*Alignment constraints for section
*)elf64_sh_entsize : Uint64_wrapper.uint64;
(*Size of each entry in table, if section is one
*)
}
elf64_section_header_table_entry
is the type of entries in the section * header table in 64-bit ELF files. Each entry in the table details a section * in the body of the ELF file.
val compare_elf64_section_header_table_entry :
elf64_section_header_table_entry ->
elf64_section_header_table_entry ->
int
compare_elf64_section_header_table_entry ent1 ent2
is an ordering comparison * function on section header table entries suitable for use in constructing * sets, finite maps and other ordered data types.
val instance_Basic_classes_Ord_Elf_section_header_table_elf64_section_header_table_entry_dict :
elf64_section_header_table_entry Lem_basic_classes.ord_class
Section header table type
Type elf32_section_header_table
represents a section header table for 32-bit * ELF files. A section header table is an array (implemented as a list, here) * of section header table entries.
Type elf64_section_header_table
represents a section header table for 64-bit * ELF files. A section header table is an array (implemented as a list, here) * of section header table entries.
Parsing and blitting
val bytes_of_elf32_section_header_table_entry :
Endianness.endianness ->
elf32_section_header_table_entry ->
Byte_sequence_wrapper.byte_sequence
bytes_of_elf32_section_header_table_entry ed ent
blits ent
to a byte sequence * assuming endianness ed
.
val read_elf32_section_header_table_entry :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf32_section_header_table_entry * Byte_sequence_wrapper.byte_sequence)
Error.error
read_elf32_section_header_table_entry ed bs0
reads a section header table * entry from bs0
assuming endianness ed
. Also returns the suffix of bs0
* after parsing. Fails if the entry cannot be read.
val bytes_of_elf64_section_header_table_entry :
Endianness.endianness ->
elf64_section_header_table_entry ->
Byte_sequence_wrapper.byte_sequence
bytes_of_elf64_section_header_table_entry ed ent
blits ent
to a byte sequence * assuming endianness ed
.
val read_elf64_section_header_table_entry :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf64_section_header_table_entry * Byte_sequence_wrapper.byte_sequence)
Error.error
read_elf64_section_header_table_entry ed bs0
reads a section header table * entry from bs0
assuming endianness ed
. Also returns the suffix of bs0
* after parsing. Fails if the entry cannot be read.
val bytes_of_elf32_section_header_table :
Endianness.endianness ->
elf32_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence
bytes_of_elf32_section_header_table ed tbl
blits section header table tbl
* to a byte sequence assuming endianness ed
.
val bytes_of_elf64_section_header_table :
Endianness.endianness ->
elf64_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence
bytes_of_elf64_section_header_table ed tbl
blits section header table tbl
* to a byte sequence assuming endianness ed
.
val read_elf32_section_header_table' :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
elf32_section_header_table_entry list Error.error
read_elf32_section_header_table' ed bs0
parses an ELF32 section header table * from byte sequence bs0
assuming endianness ed
. Assumes bs0
is of the * exact length required to parse the entire table. * Fails if any of the section header table entries cannot be parsed.
val read_elf64_section_header_table' :
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
elf64_section_header_table_entry list Error.error
read_elf64_section_header_table' ed bs0
parses an ELF64 section header table * from byte sequence bs0
assuming endianness ed
. Assumes bs0
is of the * exact length required to parse the entire table. * Fails if any of the section header table entries cannot be parsed.
val read_elf32_section_header_table :
Nat_big_num.num ->
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf32_section_header_table_entry list * Byte_sequence_wrapper.byte_sequence)
Error.error
read_elf32_section_header_table sz ed bs0
parses an ELF32 section header * table from a sz
sized prefix of byte sequence bs0
assuming endianness * ed
. The suffix of bs0
remaining after parsing is also returned. * Fails if any of the section header entries cannot be parsed or if sz
is * greater than the length of bs0
.
val read_elf64_section_header_table :
Nat_big_num.num ->
Endianness.endianness ->
Byte_sequence_wrapper.byte_sequence ->
(elf64_section_header_table_entry list * Byte_sequence_wrapper.byte_sequence)
Error.error
read_elf64_section_header_table sz ed bs0
parses an ELF64 section header * table from a sz
sized prefix of byte sequence bs0
assuming endianness * ed
. The suffix of bs0
remaining after parsing is also returned. * Fails if any of the section header entries cannot be parsed or if sz
is * greater than the length of bs0
.
Correctness criteria
TODO: what is going on here?
TODO: what is going on here?
is_elf32_addr_addralign_correct ent
checks whether an internal address * alignment constraint is met on section header table ent
. * TODO: needs tweaking to add in power-of-two constraint, too.
is_elf64_addr_addralign_correct ent
checks whether an internal address * alignment constraint is met on section header table ent
. * TODO: needs tweaking to add in power-of-two constraint, too.
is_valid_elf32_section_header_table sht
checks whether all entries of * section header table sht
are valid.
is_valid_elf64_section_header_table sht
checks whether all entries of * section header table sht
are valid.
Pretty printing
type sht_print_bundle =
(Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
The sht_print_bundle
type is used to tidy up other type signatures. Some of the * top-level string_of_ functions require six or more functions passed to them, * which quickly gets out of hand. This type is used to reduce that complexity. * The first component of the type is an OS specific print function, the second is * a processor specific print function.
val string_of_elf32_section_header_table_entry :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
elf32_section_header_table_entry ->
string
string_of_elf32_section_header_table_entry sht ent
produces a string * representation of section header table entry ent
using sht
, a * sht_print_bundle
. * OCaml specific definition.
val string_of_elf64_section_header_table_entry :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
elf64_section_header_table_entry ->
string
string_of_elf64_section_header_table_entry sht ent
produces a string * representation of section header table entry ent
using sht
, a * sht_print_bundle
. * OCaml specific definition.
val string_of_elf32_section_header_table_entry' :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
String_table.string_table ->
elf32_section_header_table_entry ->
string
string_of_elf32_section_header_table_entry' sht stab ent
produces a string * representation of section header table entry ent
using sht
and section * header string table stab
to print the name of the section header entry * correctly. * OCaml specific definition.
val string_of_elf64_section_header_table_entry' :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
String_table.string_table ->
elf64_section_header_table_entry ->
string
string_of_elf64_section_header_table_entry' sht stab ent
produces a string * representation of section header table entry ent
using sht
and section * header string table stab
to print the name of the section header entry * correctly. * OCaml specific definition.
The following defintions are default printing functions, with no ABI-specific * functionality, in order to produce a Show
instance for section header * table entries.
val string_of_elf32_section_header_table_entry_default :
elf32_section_header_table_entry ->
string
val instance_Show_Show_Elf_section_header_table_elf32_section_header_table_entry_dict :
elf32_section_header_table_entry Show.show_class
val string_of_elf64_section_header_table_entry_default :
elf64_section_header_table_entry ->
string
val instance_Show_Show_Elf_section_header_table_elf64_section_header_table_entry_dict :
elf64_section_header_table_entry Show.show_class
val string_of_elf32_section_header_table :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
elf32_section_header_table_entry list ->
string
val string_of_elf64_section_header_table :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
elf64_section_header_table_entry list ->
string
val string_of_elf32_section_header_table' :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
String_table.string_table ->
elf32_section_header_table_entry list ->
string
val string_of_elf64_section_header_table' :
((Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)
* (Nat_big_num.num ->
string)) ->
String_table.string_table ->
elf64_section_header_table_entry list ->
string
Section to segment mappings
val is_elf32_tbss_special :
elf32_section_header_table_entry ->
Elf_program_header_table.elf32_program_header_table_entry ->
bool
elf32_tbss_special shdr seg
implements the ELF_TBSS_SPECIAL macro from readelf: * * #define ELF_TBSS_SPECIAL(sec_hdr, segment) \ * (((sec_hdr)->sh_flags & SHF_TLS) != 0 \ * && (sec_hdr)->sh_type == SHT_NOBITS \ * && (segment)->p_type != PT_TLS) * * From readelf source code, file internal.h
. *
val is_elf64_tbss_special :
elf64_section_header_table_entry ->
Elf_program_header_table.elf64_program_header_table_entry ->
bool
elf64_tbss_special shdr seg
implements the ELF_TBSS_SPECIAL macro from readelf: * * #define ELF_TBSS_SPECIAL(sec_hdr, segment) \ * (((sec_hdr)->sh_flags & SHF_TLS) != 0 \ * && (sec_hdr)->sh_type == SHT_NOBITS \ * && (segment)->p_type != PT_TLS) * * From readelf source code, file internal.h
. *
val get_elf32_section_to_segment_mapping :
'a ->
elf32_section_header_table_entry list ->
Elf_program_header_table.elf32_program_header_table_entry ->
('a ->
elf32_section_header_table_entry ->
Elf_program_header_table.elf32_program_header_table_entry ->
bool) ->
String_table.string_table ->
string list Error.error
get_elf32_section_to_segment_mapping hdr sht pht isin stbl
computes the * section to segment mapping for an ELF file using information in the section * header table sht
, program header table pht
and file header hdr
. A * string table stbl
is taken to produce the string output. The test whether * a section lies withing a segment is ABI specific, so isin
is used to perform * the test.
val get_elf64_section_to_segment_mapping :
'a ->
elf64_section_header_table_entry list ->
Elf_program_header_table.elf64_program_header_table_entry ->
('a ->
elf64_section_header_table_entry ->
Elf_program_header_table.elf64_program_header_table_entry ->
bool) ->
String_table.string_table ->
string list Error.error
get_elf64_section_to_segment_mapping hdr sht pht isin stbl
computes the * section to segment mapping for an ELF file using information in the section * header table sht
, program header table pht
and file header hdr
. A * string table stbl
is taken to produce the string output. The test whether * a section lies withing a segment is ABI specific, so isin
is used to perform * the test.
Section groups
This is a COMDAT group and may duplicate other COMDAT groups in other object * files.
Any bits in the following mask ranges are reserved exclusively for OS and * processor specific semantics, respectively.
val obtain_elf32_section_group_indices :
Endianness.endianness ->
elf32_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
(Nat_big_num.num * Uint32_wrapper.uint32 list) list Error.error
obtain_elf32_section_group_indices endian sht bs0
extracts all section header * table indices of sections that are marked as being part of a section group.
val obtain_elf64_section_group_indices :
Endianness.endianness ->
elf64_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
(Nat_big_num.num * Uint32_wrapper.uint32 list) list Error.error
obtain_elf64_section_group_indices endian sht bs0
extracts all section header * table indices of sections that are marked as being part of a section group.
val obtain_elf32_tls_template :
elf32_section_header_table_entry list ->
elf32_section_header_table_entry list
obtain_elf32_tls_template sht
extracts the TLS template (i.e. all sections * in section header table sht
that have their TLS flag bit set).
val obtain_elf64_tls_template :
elf64_section_header_table_entry list ->
elf64_section_header_table_entry list
obtain_elf64_tls_template sht
extracts the TLS template (i.e. all sections * in section header table sht
that have their TLS flag bit set).
val obtain_elf32_hash_table :
Endianness.endianness ->
elf32_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
(Uint32_wrapper.uint32
* Uint32_wrapper.uint32
* Uint32_wrapper.uint32 list
* Uint32_wrapper.uint32 list)
Error.error
obtain_elf32_hash_table endian sht bs0
extracts a hash table from an ELF file * providing a section of type SHT_HASH exists in section header table sht
. * Extraction is from byte sequence bs0
assuming endianness endian
. The * return type represents the number of buckets, the number of chains, the buckets * and finally the chains.
val obtain_elf64_hash_table :
Endianness.endianness ->
elf64_section_header_table_entry list ->
Byte_sequence_wrapper.byte_sequence ->
(Uint32_wrapper.uint32
* Uint32_wrapper.uint32
* Uint32_wrapper.uint32 list
* Uint32_wrapper.uint32 list)
Error.error
obtain_elf64_hash_table endian sht bs0
extracts a hash table from an ELF file * providing a section of type SHT_HASH exists in section header table sht
. * Extraction is from byte sequence bs0
assuming endianness endian
. The * return type represents the number of buckets, the number of chains, the buckets * and finally the chains.
Special sections
construct_special_sections
contains a finite map from section name (as * a string) to the expected attributes and flags expected of that section, * as specified in the ELF specification. * NOTE: some of these are overriden by the ABI.