Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/include/coff/powerpc.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1919 
    2020   Initial release: Kim Knuttila ([email protected])  */
    21 
    22 /********************** FILE HEADER **********************/
    23 
    24 struct external_filehdr {
    25   char f_magic[2];      /* magic number                 */
    26   char f_nscns[2];      /* number of sections           */
    27   char f_timdat[4];     /* time & date stamp            */
    28   char f_symptr[4];     /* file pointer to symtab       */
    29   char f_nsyms[4];      /* number of symtab entries     */
    30   char f_opthdr[2];     /* sizeof(optional hdr)         */
    31   char f_flags[2];      /* flags                        */
    32 };
    33 
    34 #define FILHDR  struct external_filehdr
    35 #define FILHSZ  20
     21#define L_LNNO_SIZE 2
     22#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     23#include "coff/external.h"
    3624
    3725/* Bits for f_flags:
    38  *      F_RELFLG        relocation info stripped from file
    39  *      F_EXEC          file is executable (no unresolved external references)
    40  *      F_LNNO          line numbers stripped from file
    41  *      F_LSYMS         local symbols stripped from file
    42  *      F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax)
    43  */
     26        F_RELFLG        relocation info stripped from file
     27        F_EXEC          file is executable (no unresolved external references)
     28        F_LNNO          line numbers stripped from file
     29        F_LSYMS         local symbols stripped from file
     30        F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax).  */
    4431
    4532#define F_RELFLG        (0x0001)
     
    5845#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
    5946
    60 /********************** AOUT "OPTIONAL HEADER" **********************/
    61 
    62 typedef struct
    63 {
    64   char  magic[2];               /* type of file                         */
    65   char  vstamp[2];              /* version stamp                        */
    66   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    67   char  dsize[4];               /* initialized data "  "                */
    68   char  bsize[4];               /* uninitialized data "   "             */
    69   char  entry[4];               /* entry pt.                            */
    70   char  text_start[4];          /* base of text used for this file */
    71   char  data_start[4];          /* base of data used for this file */
    72 }
    73 AOUTHDR;
    74 
    75 #define AOUTSZ 28
    76 #define AOUTHDRSZ 28
    77 
    78 /********************** SECTION HEADER **********************/
    79 
    80 struct external_scnhdr {
    81   char          s_name[8];      /* section name                     */
    82   char          s_paddr[4];     /* physical address, aliased s_nlib */
    83   char          s_vaddr[4];     /* virtual address                  */
    84   char          s_size[4];      /* section size                     */
    85   char          s_scnptr[4];    /* file ptr to raw data for section */
    86   char          s_relptr[4];    /* file ptr to relocation           */
    87   char          s_lnnoptr[4];   /* file ptr to line numbers         */
    88   char          s_nreloc[2];    /* number of relocation entries     */
    89   char          s_nlnno[2];     /* number of line number entries    */
    90   char          s_flags[4];     /* flags                            */
    91 };
    92 
    93 #define SCNHDR  struct external_scnhdr
    94 #define SCNHSZ  40
    95 
    96 /*
    97  * names of "special" sections
    98  */
    99 #define _TEXT   ".text"
    100 #define _DATA   ".data"
    101 #define _BSS    ".bss"
    102 #define _COMMENT ".comment"
    103 #define _LIB ".lib"
    104 
    105 /********************** LINE NUMBERS **********************/
    106 
    107 /* 1 line number entry for every "breakpointable" source line in a section.
    108  * Line numbers are grouped on a per function basis; first entry in a function
    109  * grouping will have l_lnno = 0 and in place of physical address will be the
    110  * symbol table index of the function name.
    111  */
    112 struct external_lineno {
    113   union {
    114     char l_symndx[4];   /* function name symbol index, iff l_lnno == 0 */
    115     char l_paddr[4];    /* (physical) address of line number           */
    116   } l_addr;
    117   char l_lnno[2];       /* line number                                 */
    118 };
    119 
    120 #define LINENO  struct external_lineno
    121 #define LINESZ  6
    122 
    123 /********************** SYMBOLS **********************/
    124 
    125 #define E_SYMNMLEN      8     /* # characters in a symbol name       */
    126 
    127 /* Allow the file name length to be overridden in the including file   */
    128 #ifndef E_FILNMLEN
    129 #define E_FILNMLEN      14
    130 #endif
    131 
    132 #define E_DIMNUM        4     /* # array dimensions in auxiliary entry */
    133 
    134 struct external_syment
    135 {
    136   union {
    137     char e_name[E_SYMNMLEN];
    138     struct {
    139       char e_zeroes[4];
    140       char e_offset[4];
    141     } e;
    142   } e;
    143   char e_value[4];
    144   char e_scnum[2];
    145   char e_type[2];
    146   char e_sclass[1];
    147   char e_numaux[1];
    148 };
    149 
    150 #define SYMENT  struct external_syment
    151 #define SYMESZ  18     
    152 
    153 #define N_BTMASK        (0xf)
    154 #define N_TMASK         (0x30)
    155 #define N_BTSHFT        (4)
    156 #define N_TSHIFT        (2)
    157  
    158 union external_auxent {
    159   struct {
    160     char x_tagndx[4];              /* str, un, or enum tag indx       */
    161     union {
    162       struct {
    163         char  x_lnno[2];           /* declaration line number         */
    164         char  x_size[2];           /* str/union/array size            */
    165       } x_lnsz;
    166       char x_fsize[4];             /* size of function                */
    167     } x_misc;
    168     union {
    169       struct {                     /* if ISFCN, tag, or .bb           */
    170         char x_lnnoptr[4];         /* ptr to fcn line #               */
    171         char x_endndx[4];          /* entry ndx past block end        */
    172       } x_fcn;
    173       struct {                     /* if ISARY, up to 4 dimen.        */
    174         char x_dimen[E_DIMNUM][2];
    175       } x_ary;
    176     } x_fcnary;
    177     char x_tvndx[2];               /* tv index                        */
    178   } x_sym;
    179  
    180   union {
    181     char x_fname[E_FILNMLEN];
    182     struct {
    183       char x_zeroes[4];
    184       char x_offset[4];
    185     } x_n;
    186   } x_file;
    187  
    188   struct {
    189     char x_scnlen[4];              /* section length                  */
    190     char x_nreloc[2];              /* # relocation entries            */
    191     char x_nlinno[2];              /* # line numbers                  */
    192     char x_checksum[4];            /* section COMDAT checksum         */
    193     char x_associated[2];          /* COMDAT associated section index */
    194     char x_comdat[1];              /* COMDAT selection number         */
    195   } x_scn;
    196 };
    197 
    198 #define AUXENT  union external_auxent
    199 #define AUXESZ  18
    200 
    201 #define _ETEXT  "etext"
    202 
    20347/********************** RELOCATION DIRECTIVES **********************/
    20448
    205 struct external_reloc {
     49struct external_reloc
     50{
    20651  char r_vaddr[4];
    20752  char r_symndx[4];
Note: See TracChangeset for help on using the changeset viewer.