ldtbindex(3x)
_________________________________________________________________
ldtbindex Subroutine
compute index of symbol table entry of an executable file.
_________________________________________________________________
SYNTAX
#include <stdio.h>
#include <sys/types.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
long ldtbindex (ldptr)
LDFILE *ldptr;
DESCRIPTION
Ldtbindex returns the (long) index of the symbol table entry at
the current position of the executable file associated with
ldptr.
The index returned by ldtbindex may be used in subsequent calls
to ldtbread(3X). Ldtbindex returns the index of the symbol table
entry that begins at the current position of the executable file.
If ldtbindex is called immediately after a particular symbol
table entry has been read, it will return the index of the next
entry.
Ldtbindex will fail, returning BADINDEX, if there are no symbols
in the executable file or if the executable 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 0.
The program must be loaded with the executable file access
routine library libld.a.
SEE ALSO
ldclose(3X), ldopen(3X), ldtbread(3X), ldtbseek(3X), ldfcn(4).
CAVEATS
The executable file format is used only for executable files
(load modules), not for object files.
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
ldtbindex(3x)
BUGS
This function can be very slow since the symbol table is
currently searched linearly.
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)