[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

ldfhread Subroutine


Reads the file header of a common object file.


Object File Access Routine Library (libld.a)


#include <stdio.h>
#include <filehdr.h>
#include <ldfcn.h>
int ldfhread (ldPointer, FileHeader)
LDFILE *ldPointer;
FILHDR *FileHeader;


The ldfhread subroutine reads the file header of the common object file currently associated with the ldPointer parameter into the area of memory beginning at the FileHeader parameter.


ldPointer Points to the LDFILE structure that was returned as the result of a successful call to ldopen or ldaopen subroutine.
FileHeader Points to a FILHDR structure.

Return Values

The ldfhread subroutine returns a success or failure value.

Error Codes

The ldfhread subroutine fails if it cannot read the file header.

Note: In most cases, the use of ldfhread can be avoided by using the header (ldPointer) macro defined in the ldfcn.h file. The information in any field or fieldname of the header file may be accessed using the header (ldPointer) fieldname macro.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The ldahread subroutine, ldgetname subroutine, ldlread, ldlinit or ldlitem subroutine, ldshread or ldnshread subroutine, ldtbread subroutine.

Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Contents | Glossary | Home | Search ]