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


2.2.1 Raw byte reading

The user of these procedures must ensure that there is enough space in the bytevector prior to use (see Parsing ELF records. Exceptions are raised in case of errors (IO or other). In particular if the expected number of bytes to read are not available for reading, an ‘&error’ exception will be raised.

Procedure: read-elf-ident-bytes! port bv start

Reads the next 16 bytes from port into bv at start. Typically you do not want to use this procedure; instead you would rather use read-elf-header-bytes! to obtain the bytes of the entire ELF header.

Procedure: read-elf-header-bytes! port bv start

Reads the bytes of an ELF header from port into bv at start. It will recognize the architecture (32-bit or 64-bit) and read the rest of the header accordingly.

Procedure: read-elf-program-header-bytes! elf-header port bv start

Reads the bytes of an ELF program header entry from port into bv at start. The elf-header argument must be an instance of <elf-header>.

Procedure: read-elf-segment-bytes! program-header port bv start

Reads the bytes of a segment from port into bv at start. The program-header argument must be an instance of <elf-program-header>.

Procedure: read-elf-section-header-bytes! elf-header port bv start

Reads the bytes of an ELF section header entry from port into bv at start. The elf-header argument must be an instance of <elf-header>.

Procedure: read-elf-section-bytes! section-header port bv start

Reads the bytes of a section from port into bv at start. The section-header argument must be an instance of <elf-section-header>.

Procedure: read-elf-sym-bytes! elf-header port bv start

Reads the bytes of an ELF symbol entry from port into bv at start. The elf-header argument must be an instance of <elf-header>.

Procedure: read-elf-rel-bytes! elf-header port bv start

Reads the bytes of an ELF relocation entry from port into bv at start. The elf-header argument must be an instance of <elf-header>.

Procedure: read-elf-rela-bytes! elf-header port bv start

Reads the bytes of an ELF relocation entry with addend from port into bv at start. The elf-header argument must be an instance of <elf-header>.

Procedure: read-elf-dyn-bytes! elf-header port bv start

Reads the bytes of an ELF dynamic entry from port into bv at start. The elf-header argument must be an instance of <elf-header>.

Procedure: read-elf-nhdr-bytes! elf-header port bv start

Reads the bytes of an ELF note header entry from port into bv at start. The elf-header argument must be an instance of <elf-header>.

Procedure: read-elf-note-bytes! elf-header port bv start

Reads the bytes of an ELF note entry (meaning, both the note header and the variable-length data following it) from port into bv at start. The elf-header argument must be an instance of <elf-header>.


Next: Convenience procedures, Up: IO procedures   [Contents][Index]