Reads an indexed or named section header of a common object file.
Object File Access Routine Library (libld.a)
#include <stdio.h> #include <filehdr.h> #include <ldfcn.h> int ldshread (ldPointer, SectionIndex, SectionHead) LDFILE *ldPointer; unsigned short SectionIndex; SCNHDR *SectionHead; int ldnshread (ldPointer, SectionName, SectionHead) LDFILE *ldPointer; char *SectionName; SCNHDR *SectionHead;
The ldshread subroutine reads the section header specified by the SectionIndex parameter of the common object file currently associated with the ldPointer parameter into the area of memory beginning at the location specified by the SectionHead parameter.
The ldnshread subroutine reads the section header specified by the SectionName into the area of memory beginning at the location specified by the SectionHead parameter.
The ldshread and ldnshread subroutines return a success or failure value.
The ldshread subroutine fails if the SectionIndex parameter is greater than the number of sections in the object file. The ldnshread subroutine fails if there is no section name corresponding with the SectionName parameter. Either function fails if it cannot read the specified section header.
Note: The first section has an index of 1.
These subroutines are part of Base Operating System (BOS) Runtime.
The ldahread subroutine, ldfhread subroutine, ldgetname subroutine, ldlread, ldlinit, or ldlitem subroutine, ldtbread subroutine.
Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.