Main index | Section 3 | Options |
#include <libelf.h>
Archive member offsets may be retrieved using the elf_getarsym(3) function.
off_t off; Elf *archive, *e; amp;... cmd = ELF_C_READ; archive = elf_begin(fd, cmd, NULL); while ((e = elf_begin(fd, cmd, archive)) != (Elf *) 0) { ... process `e' here ... elf_end(e);off = ...new value...; if (elf_rand(archive, off) != off) { ... process error ... } } elf_end(archive);
To rewind an archive, use:
Elf *archive; amp;... if (elf_rand(archive, SARMAG) != SARMAG) { ... error ... }
[ELF_E_ARGUMENT] | |
Argument archive was null. | |
[ELF_E_ARGUMENT] | |
Argument archive was not a descriptor for an ar(1) archive. | |
[ELF_E_ARCHIVE] | Argument offset did not correspond to the start of an archive member header. |
ELF_RAND (3) | June 17, 2006 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Unix’s “power tools” are more like power switchblades that slice off the operator’s fingers quickly and efficiently. | ” |
— The Unix Haters' handbook |