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