Query: elf_rand
OS: hpux
Section: 3e
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
elf_rand(3E) elf_rand(3E)NAMEelf_rand - random archive member accessSYNOPSIS[flag... ] file... [library] ...DESCRIPTIONand manipulate simple object files and archives. elf is an ELF descriptor previously returned from provides random archive processing, preparing elf to access an arbitrary archive member. elf must be a descriptor for the archive itself, not a member within the archive. offset gives the byte offset from the beginning of the archive to the archive header of the desired mem- ber. See elf_getarsym(3E) for more information about archive member offsets. When works, it returns offset. Otherwise it returns 0, because an error occurred, elf was null, or the file was not an archive (no archive member can have a zero offset). A program may mix ran- dom and sequential archive processing.EXAMPLESAn archive starts with a ``magic string'' that has bytes; the initial archive member follows immediately. An application could thus pro- vide the following function to rewind an archive (the function returns -1 for errors and 0 otherwise). #include <ar.h> #include <libelf.h> int rewindelf(Elf *elf) { if (elf_rand(elf, (size_t)SARMAG) == SARMAG) return 0; return -1; }SEE ALSOar(4), elf(3E), elf_begin(3E), elf_getarsym(3E), elf_next(3E). elf_rand(3E)
Related Man Pages |
---|
elf_getarsym(3) - netbsd |
elf_rand(3) - netbsd |
elf_getarsym(3elf) - sunos |
elf_next(3) - freebsd |
elf_getarsym(3elf) - xfree86 |
Similar Topics in the Unix Linux Community |
---|
Receiving status code 39 when accessing files through program. |
simple script to alert of archive logs filling |
random script termination |
Tar Help |
Getting the lines with nth column non-null |