Next: , Up: Parsing procedures   [Contents][Index]


2.3.1 Parsing ELF records

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.

Procedure: parse-elf-ident bv start
Variable: parse-elf-ident-len

Parses 16 bytes from bv at start into an <elf-ident>. The parse-elf-ident-len variable is equal to ‘16’.

Procedure: parse-elf-header bv start
Procedure: parse-elf-header-len class

Parses bytes from bv at start into an <elf-header>.

Procedure: parse-elf-program-header bv start
Procedure: parse-elf-program-header-len class

Parses bytes from bv at start into an <elf-program-header>.

Procedure: parse-elf-section-header bv start
Procedure: parse-elf-section-header-len class

Parses bytes from bv at start into an <elf-section-header>.

Procedure: parse-elf-sym bv start
Procedure: parse-elf-sym-len class

Parses bytes from bv at start into an <elf-sym>.

Procedure: parse-elf-rel bv start
Procedure: parse-elf-rel-len class

Parses bytes from bv at start into an <elf-rel>.

Procedure: parse-elf-rela bv start
Procedure: parse-elf-rela-len class

Parses bytes from bv at start into an <elf-rela>.

Procedure: parse-elf-dyn bv start
Procedure: parse-elf-dyn-len class

Parses bytes from bv at start into an <elf-dyn>.

Procedure: parse-elf-nhdr bv start
Procedure: parse-elf-nhdr-len class

Parses bytes from bv at start into an <elf-nhdr>.

Procedure: parse-elf-note bv start

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]