elf_rand man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

elf_rand(3E)							  elf_rand(3E)

NAME
       elf_rand - random archive member access

SYNOPSIS
       [flag... ] file...  [library] ...

DESCRIPTION
       and  manipulate	simple	object	files  and  archives.	elf  is an ELF
       descriptor previously returned from

       provides random archive processing, preparing elf to  access  an	 arbi‐
       trary 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 member.
       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  ar‐
       chive  member  can  have	 a zero offset).  A program may mix random and
       sequential archive processing.

EXAMPLES
       An archive starts with a ``magic string'' that has bytes;  the  initial
       archive	member follows immediately.  An application could thus provide
       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 ALSO
       ar(4), elf(3E), elf_begin(3E), elf_getarsym(3E), elf_next(3E).

								  elf_rand(3E)
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net