ldshread(3x)
_________________________________________________________________
ldshread Subroutine
read an indexed section header of an executable file in DG/UX
_________________________________________________________________
SYNTAX
#include <stdio.h>
#include <sys/types.h>
#include <filehdr.h>
#include <ldfcn.h>
int ldshread (ldptr, sectindx, nsect)
LDFILE *ldptr;
unsigned short sectindx;
NSECTION *nsect;
DESCRIPTION
Ldshread reads the section header specified by sectindx of the
executable file currently associated with ldptr into the area of
memory beginning at secthead.
In most cases, you can avoid using ldshread by using the macro
HEADER(ldptr) defined in ldfcn.h (see ldfcn(4)). The information
in any field of any section of the section descriptor may be
accessed using
HEADER(ldptr).sectionname.fieldname.
Sectindx is the ordinal position of the section header
(descriptor) in the file header. Use mnemonic section names
specified in filehdr.h (see filehdr(4)), since the order of
section descriptors in the file header can change.
Note that the first section header has an index of 1.
Ldshread returns SUCCESS or FAILURE. Ldshread will fail if
sectindx is greater than the number of sections in the executable
file or if it cannot read the specified section header.
The program must be loaded with the executable file access
routine library libld.a.
SEE ALSO
ldclose(3X), ldopen(3X), ldfcn(4), filehdr(4).
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
ldshread(3x)
CAVEATS
The executable file format is used only for executable files
(load modules), not for object files.
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)