filehdr.5

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 5 代码 · 共 55 行

5
55
字号
.TH filehdr 5 RISC.SH Namefilehdr \- file header for RISC object files.SH Syntax.B "#include < filehdr.h>".SH DescriptionEvery RISC object file begins with a 20-byte header.  The following Cstruct declaration is used:.EX 0struct filehdr{   unsigned short  f_magic;     /* magic number */   unsigned short  f_nscns;     /* number of sections */   long            f_timdat;    /* time & date stamp */   long            f_symptr;    /* file pointer to symbolic header */   long            f_nsyms;     /* sizeof(symbolic header) */   unsigned short  f_opthdr;    /* sizeof(optional header) */   unsigned short  f_flags;     /* flags */};.EE.PPThe byte offset into the file at which the symbolic header can be found is.I f_symptr.Its value can be used as the offset in.MS fseek 3sto position an I/O stream to the symbolic header.  The ULTRIX system optionalheader is 56 bytes.  The valid magic numbers are given below:.EX 0#define MIPSEBMAGIC 0x0160 /* objects for big-endian machines */#define MIPSELMAGIC 0x0162 /* objects for little-endian machines */#define MIPSEBUMAGIC 0x0180 /* ucode objects for big-endian machines */#define MIPSELUMAGIC 0x0182 /* ucode objects for little-endian machines */.EERISC object files can be loaded and examined on machines differing from theobject's target byte sex.  Therefore, for object file magic numbers, the byte-swapped values have define constants associated with them:.EX 0#define SMIPSEBMAGIC 0x6001#define SMIPSELMAGIC 0x6201.EEThe value in.I f_timdatis obtained from the.MS time 2system call.  Flag bits used in RISC objects are:.EX 0#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 */.EE.SH See Alsotime(2), fseek(3s), a.out(5)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?