random archive member access
cc [flag . . . ] file . . . -lelf [library] . . .
size_t elf_rand(Elf *elf, size_t offset);
manipulate simple object files and archives.
descriptor previously returned from
provides random archive processing, preparing
to access an arbitrary archive member.
must be a descriptor for the archive itself,
not for a member within the archive.
gives the byte offset from the beginning of
the archive to the archive header of the desired member.
for more information about archive member offsets.
works, it returns
Otherwise it returns 0, because an error occurred,
was null, or the file was not an archive
(no archive member can have a zero offset).
A program may mix random and sequential archive processing.
Error conditions are identified through the routine
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).
if (elf_rand(elf, (size_t)SARMAG) == SARMAG)
is not part of any currently supported standard;
it was developed by UNIX System Laboratories, Inc.
and is maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003