[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1


elf_next Subroutine

Purpose

Sequential archive member access

Library

cc [flag...] file... -lelf [library]...
#include <libelf.h>

Syntax


Elf_Cmd elf_next(Elf * elf);

Description

elf_next, elf_rand, and elf_begin manipulate simple object files and archives.

elf_next provides sequential access to the next archive member. That is, having an ELF descriptor, elf, associated with an archive member, elf_next prepares the containing archive to access the following member when the program calls elf_begin.

Parameters


elf     an ELF descriptor previously returned from elf_begin.

Return Values

After successfully positioning an archive for the next member, elf_next returns the value ELF_C_READ. Otherwise, the open file was not an archive, elf was null, or an error occurred, and the return value is ELF_C_NULL. In either case, the return value can be passed as an argument to elf_begin, specifying the appropriate action.

Related Information

The ar file format.

The elf_begin (elf_begin Subroutine) subroutine, elf_getarsym (elf_getarsym Subroutine) subroutine, elf_rand (elf_rand Subroutine) subroutine.

Introduction to ELF Subroutines.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]