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

Technical Reference: Base Operating System and Extensions, Volume 1


ldtbindex Subroutine

Purpose

Computes the index of a symbol table entry of a common object file.

Library

Object File Access Routine Library (libld.a)

Syntax


#include <stdio.h>
#include <ldfcn.h>


long ldtbindex ( ldPointer)
LDFILE *ldPointer;

Description

The ldtbindex subroutine returns the index of the symbol table entry at the current position of the common object file associated with the ldPointer parameter.

The index returned by the ldtbindex subroutine may be used in subsequent calls to the ldtbread subroutine. However, since the ldtbindex subroutine returns the index of the symbol table entry that begins at the current position of the object file, if the ldtbindex subroutine is called immediately after a particular symbol table entry has been read, it returns the index of the next entry.

Parameters


ldPointer Points to the LDFILE structure that was returned as a result of a successful call to the ldopen or ldaopen subroutine.

Return Values

The ldtbindex subroutine returns the value BADINDEX upon failure. Otherwise a value greater than or equal to zero is returned.

Error Codes

The ldtbindex subroutine fails 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: The first symbol in the symbol table has an index of 0.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The ldtbread (ldtbread Subroutine) subroutine, ldtbseek (ldtbseek Subroutine) subroutine.

Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


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