01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LDFCN( 4) LDFCN ( 4)<br />

ldfhread(3X)<br />

read the file header of a common object<br />

file<br />

ldshread(3X) and ldnshread<br />

read a section header of a common object<br />

file �I<br />

ldtbread(3X)<br />

read a symbol table entry of a common<br />

object file<br />

(3) functions that position an object file at (seek to) the<br />

start of the section, relocation, or line number information<br />

for a particular section.<br />

ldohseek(3X)<br />

seek to the optional file header of a common<br />

object file<br />

ldsseek (3X) and ldnsseek<br />

seek to a section of a common object file<br />

ldrseek (3X) and ldnrseek<br />

seek to the relocation information for a<br />

section of a common object file<br />

ldlseek (3X) and ldnlseek<br />

seek to the line number information for a<br />

section of a common object file<br />

ldtbseek (3X)<br />

seek to the symbol table of a common<br />

object file<br />

( 4) the function ldtbindex(3X) which returns the index of<br />

a particular common object file symbol table entry<br />

These functions are described in detail in their respective manual<br />

pages.<br />

All the functions except ldopen, ldaopen and ldtbindex return<br />

either SUCCESS or FAILURE, both constants defined in ldfcn.h.<br />

Ldopen and ldaopen both return pointers to a LDFILE structure.<br />

MACROS<br />

Additional access to an object file is provided through a set of<br />

macros defined in ldfcn.h. These macros parallel the standard<br />

input/output file reading and manipulating functions, translating<br />

a reference of the LDFILE structure into a reference to its file<br />

descriptor field.<br />

The following macros are provided:<br />

LDFILE •ldptr;<br />

GETC(Idptr)<br />

FGETC(Idptr)<br />

GETW(Idptr)<br />

UNGETC(c, ldptr)<br />

FGETS(s, n, ldptr)<br />

FREAD(( char *) ptr, sizeof (•ptr), nitems, ldptr)<br />

FSEEK(Idptr, offset, ptrname)<br />

FTELL(Idptr)<br />

- 2-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!