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


2.2.3 Looping constructs

These procedures let you process every entry of some kind of ELF structure. See IO procedures for some caveats of their use.

Procedure: for-each-program-header elf-header port f

Apply f to each program header entry. Uses elf-header to set the position of port to the beginning of the program header table prior to reading the entries. Supports the ELF ‘PN_XNUM’ extension for ‘phnum’.

Procedure: for-each-section-header elf-header port f

Apply f to each section header entry. Uses elf-header to set the position of port to the beginning of the section header table prior to reading the entries. Supports the ELF ‘SHN_LORESERVE’ extension for ‘shnum’.

Procedure: for-each-sym elf-header section-header port f

Apply f to each ELF symbol. The section-header must be the section header table entry for the symbol table. Sets the port position to the beginning of the symbol section prior to reading the symbols.

Procedure: for-each-rel elf-header section-header port f

Apply f to each ELF relocation entry. The section-header must be the section header table entry for the relocation table. Sets the port position to the beginning of the symbol section prior to reading the relocation entries.

Procedure: for-each-rela elf-header section-header port f

Apply f to each ELF relocation entry with addend. The section-header must be the section header table entry for the relocation table. Sets the port position to the beginning of the symbol section prior to reading the relocation entries.

Procedure: for-each-dyn elf-header region-header port f

Apply f to each ELF dynamic tag. The region-header must be the a header table entry (either program header or section header) for the dynamic tag table. Sets the port position to the beginning of the dynamic tag region prior to reading the tags.

Procedure: for-each-note elf-header region-header port f

Apply f to each ELF note. The region-header must be the a header table entry (either program header or section header) for the note table. Sets the port position to the beginning of the note region prior to reading the notes.


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