ldclose(3x) ldclose(3x)
Name
ldclose, ldaclose - close a common object file
Syntax
#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
int ldclose (ldptr)
LDFILE *ldptr;
int ldaclose (ldptr)
LDFILE *ldptr;
Description
The and functions 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, 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, reinitializes OFFSET(ldptr) to the file
address of the next archive member and returns failure. The LDFILE structure is prepared for a later In all other cases, returns success.
The function closes the file and frees the memory allocated to the LDFILE structure associated with ldptr regardless of the value of
TYPE(ldptr). The function always returns success. This function is often used with
See Also
fclose(3s), intro(3x) ldopen(3x), ldfcn(5), paths.h(4)
RISC ldclose(3x)