Manual Page Result
0
Command: filehdr | Section: 4 | Source: Digital UNIX | File: filehdr.4.gz
filehdr(4) Kernel Interfaces Manual filehdr(4)
NAME
filehdr - File header for object files
SYNOPSIS
#include < filehdr.h>
DESCRIPTION
Every object file begins with a header. The following C struct decla-
ration 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 posi-
tion 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
filehdr(4)