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/arm.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* ARM COFF support for BFD.
    2    Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
     2   Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
    33
    44   This file is part of BFD, the Binary File Descriptor library.
     
    2020#define COFFARM 1
    2121
    22 /********************** FILE HEADER **********************/
    23 
    24 struct external_filehdr
    25 {
    26         char f_magic[2];        /* magic number                 */
    27         char f_nscns[2];        /* number of sections           */
    28         char f_timdat[4];       /* time & date stamp            */
    29         char f_symptr[4];       /* file pointer to symtab       */
    30         char f_nsyms[4];        /* number of symtab entries     */
    31         char f_opthdr[2];       /* sizeof(optional hdr)         */
    32         char f_flags[2];        /* flags                        */
    33 };
     22#define L_LNNO_SIZE 2
     23#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     24#include "coff/external.h"
    3425
    3526/* Bits for f_flags:
    36  *      F_RELFLG        relocation info stripped from file
    37  *      F_EXEC          file is executable (no unresolved external references)
    38  *      F_LNNO          line numbers stripped from file
    39  *      F_LSYMS         local symbols stripped from file
    40  *      F_INTERWORK     file supports switching between ARM and Thumb instruction sets
    41  *      F_INTERWORK_SET the F_INTERWORK bit is valid
    42  *      F_APCS_FLOAT    code passes float arguments in float registers
    43  *      F_PIC           code is reentrant/position-independent
    44  *      F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax)
    45  *      F_APCS_26       file uses 26 bit ARM Procedure Calling Standard
    46  *      F_APCS_SET      the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
    47  *      F_SOFT_FLOAT    code does not use floating point instructions
    48  */
     27        F_RELFLG        relocation info stripped from file
     28        F_EXEC          file is executable (no unresolved external references)
     29        F_LNNO          line numbers stripped from file
     30        F_LSYMS         local symbols stripped from file
     31        F_INTERWORK     file supports switching between ARM and Thumb instruction sets
     32        F_INTERWORK_SET the F_INTERWORK bit is valid
     33        F_APCS_FLOAT    code passes float arguments in float registers
     34        F_PIC           code is reentrant/position-independent
     35        F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax)
     36        F_APCS_26       file uses 26 bit ARM Procedure Calling Standard
     37        F_APCS_SET      the F_APCS_26, F_APCS_FLOAT and F_PIC bits have been initialised
     38        F_SOFT_FLOAT    code does not use floating point instructions.  */
    4939
    5040#define F_RELFLG        (0x0001)
     
    6151#define F_APCS_SET      (0x0800)
    6252#define F_SOFT_FLOAT    (0x2000)
     53
    6354
    6455/* Bits stored in flags field of the internal_f structure */
     
    7869
    7970/*
    80  * ARMMAGIC ought to encoded the procesor type,
    81  * but it is too late to change it now, instead
    82  * the flags field of the internal_f structure
    83  * is used as shown above.
    84  *
    85  * XXX - NC 5/6/97
    86  */
     71  ARMMAGIC ought to encoded the procesor type,
     72  but it is too late to change it now, instead
     73  the flags field of the internal_f structure
     74  is used as shown above.
     75 
     76  XXX - NC 5/6/97.  */
    8777
    8878#define ARMMAGIC        0xa00  /* I just made this up */
     
    9686#define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC))
    9787
    98 #define FILHDR  struct external_filehdr
    99 #define FILHSZ  20
    100 
    101 
    102 /********************** AOUT "OPTIONAL HEADER" **********************/
    103 
    104 
    105 typedef struct
    106 {
    107   char  magic[2];               /* type of file                         */
    108   char  vstamp[2];              /* version stamp                        */
    109   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    110   char  dsize[4];               /* initialized data "  "                */
    111   char  bsize[4];               /* uninitialized data "   "             */
    112   char  entry[4];               /* entry pt.                            */
    113   char  text_start[4];          /* base of text used for this file */
    114   char  data_start[4];          /* base of data used for this file */
    115 }
    116 AOUTHDR;
    117 
    118 
    119 #define AOUTSZ 28
    120 #define AOUTHDRSZ 28
    121 
    12288#define OMAGIC          0404    /* object files, eg as output */
    12389#define ZMAGIC          0413    /* demand load format, eg normal ld output */
    12490#define STMAGIC         0401    /* target shlib */
    12591#define SHMAGIC         0443    /* host   shlib */
    126 
    12792
    12893/* define some NT default values */
     
    13398#define NT_DEF_COMMIT        0x1000
    13499
    135 /********************** SECTION HEADER **********************/
    136 struct external_scnhdr
    137 {
    138         char            s_name[8];      /* section name                 */
    139         char            s_paddr[4];     /* physical address, aliased s_nlib */
    140         char            s_vaddr[4];     /* virtual address              */
    141         char            s_size[4];      /* section size                 */
    142         char            s_scnptr[4];    /* file ptr to raw data for section */
    143         char            s_relptr[4];    /* file ptr to relocation       */
    144         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    145         char            s_nreloc[2];    /* number of relocation entries */
    146         char            s_nlnno[2];     /* number of line number entries*/
    147         char            s_flags[4];     /* flags                        */
    148 };
    149 
    150 #define SCNHDR  struct external_scnhdr
    151 #define SCNHSZ  40
    152 
    153 /*
    154  * names of "special" sections
    155  */
    156 #define _TEXT   ".text"
    157 #define _DATA   ".data"
    158 #define _BSS    ".bss"
    159 #define _COMMENT ".comment"
    160 #define _LIB ".lib"
    161 
    162100/* We use the .rdata section to hold read only data.  */
    163101#define _LIT    ".rdata"
    164 
    165 /********************** LINE NUMBERS **********************/
    166 
    167 /* 1 line number entry for every "breakpointable" source line in a section.
    168  * Line numbers are grouped on a per function basis; first entry in a function
    169  * grouping will have l_lnno = 0 and in place of physical address will be the
    170  * symbol table index of the function name.
    171  */
    172 struct external_lineno
    173 {
    174         union
    175         {
    176                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    177                 char l_paddr[4];        /* (physical) address of line number    */
    178         } l_addr;
    179         char l_lnno[2]; /* line number          */
    180 };
    181 
    182 
    183 #define LINENO  struct external_lineno
    184 #define LINESZ  6
    185 
    186 
    187 /********************** SYMBOLS **********************/
    188 
    189 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    190 #define E_FILNMLEN      14      /* # characters in a file name          */
    191 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    192 
    193 struct external_syment
    194 {
    195   union
    196   {
    197     char e_name[E_SYMNMLEN];
    198     struct
    199     {
    200       char e_zeroes[4];
    201       char e_offset[4];
    202     } e;
    203   } e;
    204   char e_value[4];
    205   char e_scnum[2];
    206   char e_type[2];
    207   char e_sclass[1];
    208   char e_numaux[1];
    209 };
    210 
    211 #define N_BTMASK        (0xf)
    212 #define N_TMASK         (0x30)
    213 #define N_BTSHFT        (4)
    214 #define N_TSHIFT        (2)
    215 
    216 union external_auxent
    217 {
    218         struct
    219         {
    220                 char x_tagndx[4];       /* str, un, or enum tag indx */
    221                 union
    222                 {
    223                         struct
    224                         {
    225                             char  x_lnno[2]; /* declaration line number */
    226                             char  x_size[2]; /* str/union/array size */
    227                         } x_lnsz;
    228                         char x_fsize[4];        /* size of function */
    229                 } x_misc;
    230                 union
    231                 {
    232                         struct                  /* if ISFCN, tag, or .bb */
    233                         {
    234                             char x_lnnoptr[4];  /* ptr to fcn line # */
    235                             char x_endndx[4];   /* entry ndx past block end */
    236                         } x_fcn;
    237                         struct                  /* if ISARY, up to 4 dimen. */
    238                         {
    239                             char x_dimen[E_DIMNUM][2];
    240                         } x_ary;
    241                 } x_fcnary;
    242                 char x_tvndx[2];                /* tv index */
    243         } x_sym;
    244 
    245         union
    246         {
    247                 char x_fname[E_FILNMLEN];
    248                 struct
    249                 {
    250                         char x_zeroes[4];
    251                         char x_offset[4];
    252                 } x_n;
    253         } x_file;
    254 
    255         struct
    256         {
    257                 char x_scnlen[4];       /* section length */
    258                 char x_nreloc[2];       /* # relocation entries */
    259                 char x_nlinno[2];       /* # line numbers */
    260                 char x_checksum[4];     /* section COMDAT checksum */
    261                 char x_associated[2];   /* COMDAT associated section index */
    262                 char x_comdat[1];       /* COMDAT selection number */
    263         } x_scn;
    264 
    265         struct
    266         {
    267                 char x_tvfill[4];       /* tv fill value */
    268                 char x_tvlen[2];        /* length of .tv */
    269                 char x_tvran[2][2];     /* tv range */
    270         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    271 };
    272 
    273 #define SYMENT  struct external_syment
    274 #define SYMESZ  18     
    275 #define AUXENT  union external_auxent
    276 #define AUXESZ  18
    277 
    278 #define _ETEXT  "etext"
    279102
    280103/********************** RELOCATION DIRECTIVES **********************/
     
    302125#define RELSZ 14
    303126#endif
     127
     128
Note: See TracChangeset for help on using the changeset viewer.