ldclose(3X)

ldclose, ldaclose - Closes a common object file

As shipped in IRIX 6.5.5. Last changed in IRIX 6.5.5.

NAME
     ldclose, ldaclose - Closes a common object file

SYNOPSIS
     #include <stdio.h>
     #include <filehdr.h>
     #include <syms.h>
     #include <ldfcn.h>

     int ldclose (ldptr)
     LDFILE *ldptr;

     int ldaclose (ldptr)
     LDFILE *ldptr;

IMPLEMENTATION
     IRIX systems (o32 ABI only)

DESCRIPTION
     ldopen(3X) and ldclose provide uniform access to simple object files
     and object files that are members of archive files.  An archive of
     common object files can be processed as if it is a series of simple
     common object files.

     If TYPE(ldptr) does not represent an archive file, ldclose closes the
     file and frees the memory allocated to the LDFILE structure associated
     with ldptr.  If TYPE(ldptr) is the magic number for an archive file
     and if archive has more files, ldclose reinitializes OFFSET(ldptr) to
     the file address of the next archive member and returns FAILURE.  The
     LDFILE structure is prepared for a later ldopen(3X).  In all other
     cases, ldclose returns SUCCESS.

     ldaclose closes the file and frees the memory allocated to the LDFILE
     structure associated with ldptr regardless of the value of
     TYPE(ldptr).  ldaclose always returns SUCCESS.  The function is often
     used with ldaopen.

     The program must be loaded with the object file access routine library

BUGS
     Only the memory associated with the LDFILE structure proper is freed.
     Memory allocated for subordinate structures (e.g. the symbol table)
     must be freed prior to calling ldclose or ldaclose.

SEE ALSO
     fclose(3S), ldopen(3X)

     intro(4), ldfcn(4), paths.h(4)

     This man page is available only online.