aout.htm

来自「刚刚看到本站有Visual C++数字图象处理(人民邮电出版社)的电子书」· HTM 代码 · 共 1,084 行 · 第 1/5 页

HTM
1,084
字号
                  unsigned int subspace_location;           /* file ptr to subsp dict */

                  unsigned int subspace_total;           /* # of subspaces */

                  unsigned int loader_fixup_location;   /* reserved */

                  unsigned int loader_fixup_total;           /* reserved */

                  unsigned int space_strings_location;  /* file ptr to sp. strings */

                  unsigned int space_strings_size;           /* sizeof sp. strings */

                  unsigned int init_array_location;     /* reserved */

                  unsigned int init_array_total;           /* reserved */

                  unsigned int compiler_location;           /* file ptr to comp recs */

                  unsigned int compiler_total;           /* # of compiler recs */

                  unsigned int symbol_location;           /* file ptr to sym table */

                  unsigned int symbol_total;           /* # of symbols */

                  unsigned int fixup_request_location;  /* file ptr to fixups */

                  unsigned int fixup_request_total;     /* # of fixups */

                  unsigned int symbol_strings_location; /* file ptr to sym strings */

                  unsigned int symbol_strings_size;     /* sizeof sym strings */

                  unsigned int unloadable_sp_location;  /* file ptr to debug info */

                  unsigned int unloadable_sp_size;           /* size of debug info */

                  unsigned int checksum;                 /* header checksum */

              \};

     

           the timestamp is a two-word structure as shown below.  if unused, both

           fields are zero.

     

              struct sys_clock \{

                  unsigned int secs;

                  unsigned int nanosecs;

              \};

     

         auxiliary headers

           the auxiliary headers are contained in a single contiguous area in the

           file, and are located by a pointer in the file header.  auxiliary

           headers are used for two purposes:  users can attach version and

           copyright strings to an object file, and an auxiliary header contains

           the information needed to load an executable program.  in an

           executable program, the hp-ux auxiliary header must precede all other

           auxiliary headers.  the following declarations are found in

           <aouthdr.h>.

     

              struct aux_id \{

                  unsigned int  mandatory : 1;  /* reserved */

                  unsigned int  copy : 1;           /* reserved */

                  unsigned int  append : 1;     /* reserved */

                  unsigned int  ignore : 1;     /* reserved */

                  unsigned int  reserved : 12;  /* reserved */

                  unsigned int  type : 16;           /* aux hdr type */

                  unsigned int  length;           /* sizeof rest of aux hdr */

              \};

     

              /* values for the aux_id.type field */

              #define hpux_aux_id 4

              #define version_aux_id 6

              #define copyright_aux_id 9

              #define shlib_version_aux_id 10

     

              struct som_exec_auxhdr \{          /* hp-ux auxiliary header */

                  struct      aux_id som_auxhdr;  /* aux header id */

                  long            exec_tsize;   /* text size */

                  long            exec_tmem;    /* start address of text */

                  long            exec_tfile;   /* file ptr to text */

                  long            exec_dsize;   /* data size */

                  long            exec_dmem;    /* start address of data */

                  long            exec_dfile;   /* file ptr to data */

                  long            exec_bsize;   /* bss size */

                  long            exec_entry;   /* address of entry point */

                  long            exec_flags;   /* loader flags */

                  long            exec_bfill;   /* bss initialization value */

              \};

     

              /* values for exec_flags */

              #define trap_nil_ptrs    01

     

              struct user_string_aux_hdr \{             /* version string auxiliary header */

                  struct aux_id  header_id;       /* aux header id */

                  unsigned int   string_length;   /* strlen(user_string) */

                  char            user_string[1];  /* user-defined string */

              \};

     

              struct copyright_aux_hdr \{            /* copyright string auxiliary header */

                  struct aux_id  header_id;      /* aux header id */

                  unsigned int   string_length;  /* strlen(user_string) */

                  char            copyright[1];   /* user-defined string */

              \};

              struct shlib_version_aux_hdr \{

                  struct aux_id  header_id;      /* aux header id */

                  short  version;                  /* version number */

              \};

     

         space dictionary

           the space dictionary consists of a sequence of space records as

           defined in <spacehdr.h>.

     

           struct space_dictionary_record \{"

             union name_pt name;                /* index to space name */

             unsigned int      is_loadable: 1;          /* space is loadable */

             unsigned int      is_defined: 1;          /* space is defined within file */

             unsigned int      is_private: 1;          /* space is not sharable */

             unsigned int      reserved: 13;          /* reserved */

             unsigned int      sort_key: 8;          /* sort key for space */

             unsigned int      reserved2: 8;          /* reserved */

             int            space_number;          /* space index */

             int            subspace_index;          /* index to first subspace */

             unsigned int      subspace_quantity;  /* # of subspaces in space */

             int            loader_fix_index;       /* reserved */

             unsigned int      loader_fix_quantity;       /* reserved */

             int            init_pointer_index;       /* reserved */

             unsigned int      init_pointer_quantity;       /* reserved */

           \};

           the strings for the space names are contained in the space strings

           table, which is located by a pointer in the file header.      each entry

           in the space strings table is preceded by a 4-byte integer that

           defines the length of the string, and is terminated by one to five

           null characters to pad the string out to a word boundary.       indices to

           this table are relative to the start of the table, and point to the

           first byte of the string (not the preceding length word).       the union

           defined below is used for all such string pointers; the character

           pointer is defined for programs that read the string table into memory

           and wish to relocate in-memory copies of space records.

     

              union name_pt \{

                  char           *n_name;

                  unsigned int   n_strx;

              \};

     

         subspace dictionary

           the subspace dictionary consists of a sequence of subspace records as

           defined in <scnhdr.h>.  strings for subspace names are contained in

           the space strings table.

     

           struct subspace_dictionary_record \{

             int            space_index;

             unsigned int      access_control_bits: 7; /* reserved */

             unsigned int      memory_resident: 1;      /* reserved */

             unsigned int      dup_common: 1;            /* cobol-style common */

             unsigned int      is_common: 1;            /* subspace is a common block */

             unsigned int      is_loadable: 1;            /* subspace is loadable */

             unsigned int      quadrant: 2;            /* reserved */

             unsigned int      initially_frozen: 1;      /* reserved */

             unsigned int      is_first: 1;            /* reserved */

             unsigned int      code_only: 1;            /* subspace contains only code */

             unsigned int      sort_key: 8;            /* subspace sort key */

             unsigned int      replicate_init: 1;      /* reserved */

             unsigned int      continuation: 1;      /* reserved */

             unsigned int      reserved: 6;            /* reserved */

             int            file_loc_init_value;      /* file location or init value */

             unsigned int      initialization_length;      /* length of initialization */

             unsigned int      subspace_start;            /* starting offset */

             unsigned int      subspace_length;      /* total subspace length */

             unsigned int      reserved2: 16;            /* reserved */

             unsigned int      alignment: 16;            /* alignment required */

             union name_pt name;                  /* index of subspace name */

             int            fixup_request_index;      /* index to first fixup */

             unsigned int      fixup_request_quantity; /* # of fixup requests */

           \};

     

         symbol table

           the symbol table consists of a sequence of entries described by the

           structure shown below, from <syms.h>.  strings for symbol and

           qualifier names are contained in the symbol strings table, whose

           structure is identical with the space strings table.

     

              struct symbol_dictionary_record \{

                  unsigned int    hidden: 1;          /* reserved */

                  unsigned int    symbol_type: 7;          /* symbol type */

                  unsigned int    symbol_scope: 4;          /* symbol value */

                  unsigned int    check_level: 3;          /* type checking level */

                  unsigned int    must_qualify: 1;          /* qualifier required */

                  unsigned int    initially_frozen: 1; /* reserved */

                  unsigned int    memory_resident: 1;  /* reserved */

                  unsigned int    is_common: 1;          /* common block */

                  unsigned int    dup_common: 1;          /* cobol-style common */

                  unsigned int    xleast: 2;          /* reserved */

                  unsigned int    arg_reloc: 10;          /* parameter relocation bits */

                  union name_pt   name;                /* index to symbol name */

                  union name_pt   qualifier_name;          /* index to qual name */

                  unsigned int    symbol_info;          /* subspace index */

                  unsigned int    symbol_value;          /* symbol value */

              \};

     

              /* values for symbol_type */

              #define st_null         0      /* unused symbol entry */

              #define st_absolute         1      /* non-relocatable symbol */

              #define st_data         2      /* data symbol */

              #define st_code         3      /* generic code symbol */

              #define st_pri_prog         4      /* program entry point */

              #define st_sec_prog         5      /* secondary prog entry point*/

              #define st_entry         6      /* procedure entry point */

              #define st_storage         7      /* storage request */

              #define st_stub         8      /* reserved */

              #define st_module         9      /* pascal module name */

              #define st_sym_ext         10      /* symbol extension record */

              #define st_arg_ext         11      /* argument extension record */

              #define st_millicode         12      /* millicode entry point */

              #define st_plabel         13      /* reserved */

              #define st_oct_dis         14      /* reserved */

              #define st_milli_ext         15      /* reserved */

     

              /* values for symbol_scope */

              #define ss_unsat         0      /* unsatisfied reference */

              #define ss_external         1      /* reserved */

              #define ss_local         2      /* local symbol */

              #define ss_universal         3      /* global symbol */

     

           the meaning of the symbol value depends on the symbol type.  for the

           code symbols (generic code, program entry points, procedure and

           millicode entry points), the low-order two bits of the symbol value

           encode the execution privilege level, which is not used on hp-ux, but

           is generally set to 3.  the symbol value with those bits masked out is

           the address of the symbol (which is always a multiple of 4).  for data

           symbols, the symbol value is simply the address of the symbol.  for

           storage requests, the symbol value is the number of bytes requested;

           the linker allocates space for the largest request for each symbol in

           the $bss$ subspaces, unless a local or universal symbol is found for

           that symbol (in which case the storage request is treated like an

           unsatisfied reference).

     

           if a relocatable file is compiled with parameter type checking,

⌨️ 快捷键说明

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