LDTBINDEX(S) UNIX System V LDTBINDEX(S)
Name
ldtbindex - compute the index of a symbol table entry of a
common object file
Syntax
#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
long ldtbindex (ldptr)
LDFILE *ldptr;
Description
The ldtbindex function returns the (long) index of the
symbol table entry at the current position of the common
object file associated with ldptr.
The index returned by ldtbindex may be used in subsequent
calls to ldtbread(S). However, since ldtbindex returns the
index of the symbol table entry that begins at the current
position of the object file, if ldtbindex is called
immediately after a particular symbol table entry has been
read, it will return the index of the next entry.
The ldtbindex function will fail if there are no symbols in
the object file, or if the object file is not positioned at
the beginning of a symbol table entry.
Note that the first symbol in the symbol table has an index
of zero.
The program must be loaded with the -lld flag.
See Also
ldclose(S), ldopen(S), ldtbread(S), ldtbseek(S), ldfcn(F)
(printed 6/20/89)