Next: Parsing string tables, Up: Parsing procedures [Contents][Index]
The parsing procedures below are intended to be used in conjunction with the Raw byte reading procedures.
All of the parsing procedures are named ‘parse-*’ and come with a corresponding ‘parse-*-len’ that informs the user of the number of bytes expected from the respective parsing procedure. For example:
(parse-elf-program-header-len ELFCLASS32)
Example 2.1: The number of bytes required for parsing an
<elf-program-header> in 32-bit files.
The notable exception is ‘parse-elf-ident-len’, which is a variable instead of a procedure, as the ELF identifier is architecture-independent.
Parses 16 bytes from bv at start into an <elf-ident>.
The parse-elf-ident-len variable is equal to ‘16’.
Parses bytes from bv at start into an <elf-header>.
Parses bytes from bv at start into an
<elf-program-header>.
Parses bytes from bv at start into an
<elf-section-header>.
Parses bytes from bv at start into an <elf-sym>.
Parses bytes from bv at start into an <elf-rel>.
Parses bytes from bv at start into an <elf-rela>.
Parses bytes from bv at start into an <elf-dyn>.
Parses bytes from bv at start into an <elf-nhdr>.
Parses bytes from bv at start into an <elf-note>.
There is no ‘parse-elf-note-len’ because notes are variable-sized
according to the note header.
Next: Parsing string tables, Up: Parsing procedures [Contents][Index]