Closes a common object file.
Object File Access Routine Library (libld.a)
int ldclose( ldPointer)
The ldopen and ldclose subroutines provide uniform access to both simple object files and object files that are members of archive files. Thus, an archive of common object files can be processed as if it were a series of simple common object files.
If the ldfcn.h file TYPE(ldPointer) macro is the magic number of an archive file, and if there are any more files in the archive, the ldclose subroutine reinitializes the ldfcn.h file OFFSET(ldPointer) macro to the file address of the next archive member and returns a failure value. The ldfile structure is prepared for a subsequent ldopen.
If the TYPE(ldPointer) macro does not represent an archive file, the ldclose subroutine closes the file and frees the memory allocated to the ldfile structure associated with ldPointer.
The ldaclose subroutine closes the file and frees the memory allocated to the ldfile structure associated with the ldPointer parameter regardless of the value of the TYPE(ldPointer) macro.
|ldPointer||Pointer to the LDFILE structure that was returned as the result of a successful call to ldopen or ldaopen.|
The ldclose subroutine returns a SUCCESS or FAILURE value.
The ldaclose subroutine always returns a SUCCESS value and is often used in conjunction with the ldaopen subroutine.
The ldclose subroutine returns a failure value if there are more files to archive.
These subroutines are part of Base Operating System (BOS) Runtime.
The ldaopen or ldopen (ldopen or ldaopen Subroutine) subroutine.
Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.