Content-type: text/html Man page of filehdr

filehdr

Section: Devices and Network Interfaces (4)
Index Return to Main Contents
 

NAME

filehdr - File header for object files  

SYNOPSIS

#include < filehdr.h>  

DESCRIPTION

Every object file begins with a header. The following C struct declaration is used:

struct filehdr {
    unsigned short f_magic; /* magic number */
    unsigned short f_nscns; /* number of sections */
    int f_timdat; /* time & date stamp */
    long f_symptr; /* file pointer to symbolic header */
    int  f_nsyms; /* sizeof(symbolic header) */
    unsigned short f_opthdr; /* sizeof(optional header) */
    unsigned short f_flags; /* flags */ };

f_symptr is the byte offset into the file at which the symbolic header can be found. Its value can be used as the offset in fseek(3) to position an I/O stream to the symbolic header. f_nsyms contains the size of the symbolic header. The valid magic numbers are given below:

#define ALPHAMAGIC   0603 /* object file */
#define ALPHAMAGICZ 0610 /* compressed object file */ #define ALPHAUMAGIC     0617    /* ucode object file */

The value in f_timdat is obtained from the times(3) system call. Flag bits used in objects are:

#define F_RELFLG 0000001 /* relocation entries stripped */ #define F_EXEC 0000002 /* file is executable */ #define F_LNNO 0000004 /* line numbers stripped */ #define F_LSYMS 0000010 /* local symbols stripped */

 

RELATED INFORMATION

times(3), fseek(3), a.out(4).

delim off


 

Index

NAME
SYNOPSIS
DESCRIPTION
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:03 GMT, October 02, 2010