ldsseek or ldnsseek Subroutine
Purpose
Seeks to an indexed or named section of a common object file.
Library
Object File Access Routine Library (libld.a)
Syntax
#include <ldfcn.h>
int ldsseek ( ldPointer, SectionIndex)
LDFILE *ldPointer;
unsigned short SectionIndex;
int ldnsseek (ldPointer, SectionName)
LDFILE *ldPointer;
char *SectionName;
Description
The ldsseek subroutine seeks to the section specified by the SectionIndex parameter of the common object file currently associated with the ldPointer parameter. The subroutine determines the object mode of the associated file before seeking to the indicated section.
The ldnsseek subroutine seeks to the section specified by the SectionName parameter.
Parameters
Item | Description |
---|---|
ldPointer | Points to the LDFILE structure that was returned as the result of a successful call to the ldopen or ldaopen subroutine. |
SectionIndex | Specifies the index of the section whose line number entries are to be seeked to. |
SectionName | Specifies the name of the section whose line number entries are to be seeked to. |
Return Values
The ldsseek and ldnsseek subroutines return a SUCCESS or FAILURE value.
Error Codes
The ldsseek subroutine fails if the SectionIndex parameter is greater than the number of sections in the object file. The ldnsseek subroutine fails if there is no section name corresponding with the SectionName parameter. Either function fails if there is no section data for the specified section or if it cannot seek to the specified section.