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

binutils v2.14 - offical sources.

Location:
branches/GNU/src/binutils/include/coff
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/include/coff/ChangeLog

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 2001-06-11  Alan Modra  <amodra@bigpond.net.au>
    2 
    3         Merge from mainline.
    4         2001-02-09  David Mosberger  <davidm@hpl.hp.com>
     12003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
     2
     3        * coff/h8300.h (H8300HNMAGIC, H8300SNMAGIC): New.
     4        (H8300HNBADMAG, H8300SNBADMAG): New.
     5
     62003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
     7
     8        * sh.h: Replace occurrances of 'Hitachi' with 'Renesas'.
     9        * h8300.h: Likewise.
     10        * h8500.h: Likewise.
     11
     122003-03-25  Stan Cox   <scox@redhat.com>
     13            Nick Clifton  <nickc@redhat.com>
     14           
     15        Contribute support for Intel's iWMMXt chip - an ARM variant:
     16
     17        * arm.h (ARM_NOTE_SECTION): Define.
     18
     192002-11-30  Alan Modra  <amodra@bigpond.net.au>
     20
     21        * ecoff.h: Replace boolean with bfd_boolean.
     22        * xcoff.h: Likewise.
     23
     242002-03-18  Tom Rix  <trix@redhat.com>
     25
     26        * rs6k64.h: Add U64_TOCMAGIC, AIX 5 64 bit magic number.
     27
     282002-02-01  Tom Rix  <trix@redhat.com>
     29
     30        * xcoff.h: Conditionally support <aiaff> for pre AIX 4.3.
     31 
     322002-01-31  Ivan Guzvinec  <ivang@opencores.org>
     33
     34        * or32.h: New file.
     35
     362001-12-24  Tom Rix  <trix@redhat.com>
     37
     38        * xcoff.h (xcoff_big_format_p): Make <bigaf> the default archive
     39        format.
     40        (XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for
     41        archive header ascii elements. 
     42
     432001-12-17  Tom Rix  <trix@redhat.com>
     44
     45        * xcoff.h :  Add .except and .typchk section string and styp flags.
     46        Fix xcoff_big_format_p macro. 
     47
     482001-12-16  Tom Rix  <trix@redhat.com>
     49
     50        * xcoff.h : Clean up formatting.
     51
     522002-01-15  Richard Earnshaw  <rearnsha@arm.com>
     53
     54        * arm.h (F_VFP_FLOAT): Define.
     55
     562001-11-11  Timothy Wall  <twall@alum.mit.edu>
     57
     58        * ti.h: Move arch-specific stuff from here...
     59        (COFF_ADJUST_SYM_IN/OUT): Optionally put page flag into symbol
     60        value.
     61        * tic54x.h: ...to here.
     62       
     632001-10-26  Christian Groessler  <cpg@aladdin.de>
     64
     65        * external.h (GET_LINENO_LNNO): Fix usage of H_GET_32/16.
     66        (PUT_LINENO_LNNO): Likewise with H_PUT_32/16.
     67
     682001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
     69
     70        * ti.h (GET_SCNHDR_PAGE): Fix compile time warning.
     71
     722001-09-18  Alan Modra  <amodra@bigpond.net.au>
     73
     74        * external.h (GET_LINENO_LNNO): Use H_GET_32/16.
     75        (PUT_LINENO_LNNO): Use H_PUT_32/16.
     76        * m88k.h (GET_LNSZ_SIZE, GET_LNSZ_LNNO, GET_SCN_NRELOC,
     77        GET_SCN_NLINNO): Use H_GET_32.
     78        (PUT_LNSZ_LNNO, PUT_LNSZ_SIZE, PUT_SCN_NRELOC, PUT_SCN_NLINNO):
     79        Use H_PUT_32.
     80        * ti.h: Formatting fixes.  Make use of H_GET_* and H_PUT_* throughout.
     81        * xcoff.h: White space changes.
     82
     832001-09-05  Tom Rix <trix@redhat.com>
     84
     85        * xcoff.h : Add XCOFF_SYSCALL32 and XCOFF_SYSCALL64 hash table flags.
     86       
     872001-08-27  Andreas Jaeger  <aj@suse.de>
     88
     89        * xcoff.h (struct __rtinit): Make proper prototype for rtl.
     90
     91Fri Aug 24 01:18:51 2001  J"orn Rennecke <amylaar@redhat.com>
     92
     93        * internal.h (R_JMP2, R_JMPL2, R_MOVL2): Comment spelling fix.
     94
     952001-04-05  Tom Rix <trix@redhat.com>
     96
     97        * rs6000.h : move xcoff32 external structures from xcofflink.
     98        * rs6k64.h : move xcoff64 external structures from xcofflink.
     99        * internal.h : promote 32 bit structure elements to 64 bit
     100        for xcoff64 support
     101        * xcoff.h : New file.
     102       
     1032001-03-23  Nick Clifton  <nickc@redhat.com>
     104
     105        * a29k.h: Fix compile time warning.
     106        * external.h: Fix compile time warning.
     107        * m88k.h: Fix compile time warning.
     108
     1092001-03-13  Nick Clifton  <nickc@redhat.com>
     110
     111        * external.h: New file. Common structure definitions found in
     112        other COFF header files.
     113
     114        * a29k.h: Use external.h.
     115        * apollo.h: Use external.h.
     116        * arm.h: Use external.h.
     117        * h8300.h: Use external.h.
     118        * h8500.h: Use external.h.
     119        * i386.h: Use external.h.
     120        * i860.h: Use external.h.
     121        * ia64.h: Use external.h.
     122        * m68k.h: Use external.h.
     123        * m88k.h: Use external.h.
     124        * mcore.h: Use external.h.
     125        * mips.h: Use external.h.
     126        * mipspe.h: Use external.h.
     127        * powerpc.h: Use external.h.
     128        * rs6000.h: Use external.h.
     129        * rs6k64.h: Use external.h.
     130        * sh.h: Use external.h.
     131        * sparc.h: Use external.h.
     132        * tic30.h: Use external.h.
     133        * tic80.h: Use external.h.
     134        * w65.h: Use external.h.
     135        * we32k.h: Use external.h.
     136        * z8k.h: Use external.h.
     137
     1382001-02-09  David Mosberger  <davidm@hpl.hp.com>
     139
    5140        * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
    6141        Rename from PEPAOUTHDR.
    7142
    8 2001-06-07  Alan Modra  <amodra@bigpond.net.au>
    9 
    10         * Many files: Update copyright notices.
    11 
    12 2001-02-17  Philip Blundell  <philb@gnu.org>
    13 
    14         From 2001-01-23  H.J. Lu  <hjl@gnu.org>
     1432001-01-23  H.J. Lu  <hjl@gnu.org>
     144
    15145        * pe.h (struct external_PEI_DOS_hdr): New.
    16146        (struct external_PEI_IMAGE_hdr): New.
  • branches/GNU/src/binutils/include/coff/a29k.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323#endif
    2424
    25 /****************************************************************/
    26 
    27 /*
    28 ** File Header and related definitions
    29 */
    30 
    31 struct external_filehdr
    32 {
    33         char f_magic[2];        /* magic number          */
    34         char f_nscns[2];        /* number of sections      */
    35         char f_timdat[4];       /* time & date stamp        */
    36         char f_symptr[4];       /* file pointer to symtab       */
    37         char f_nsyms[4];        /* number of symtab entries     */
    38         char f_opthdr[2];       /* sizeof(optional hdr)  */
    39         char f_flags[2];        /* flags                        */
    40 };
    41 
    42 #define FILHDR  struct external_filehdr
    43 #define FILHSZ  20
    44 
    45 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
     25#define L_LNNO_SIZE 2
     26#include "coff/external.h"
    4627
    4728/*
     
    5334#define SIPRBOMAGIC     0573    /* Am29000 (Byte 0 is LSB) */
    5435
    55 
    5636#define A29K_MAGIC_BIG          SIPFBOMAGIC     
    5737#define A29K_MAGIC_LITTLE       SIPRBOMAGIC     
    58 #define A29KBADMAG(x)   (((x).f_magic!=A29K_MAGIC_BIG) && \
    59                           ((x).f_magic!=A29K_MAGIC_LITTLE))
     38#define A29KBADMAG(x)   ( ((x).f_magic != A29K_MAGIC_BIG) && \
     39                          ((x).f_magic != A29K_MAGIC_LITTLE))
    6040
    6141#define OMAGIC A29K_MAGIC_BIG
     
    7151/*--------------------------------------------------------------*/
    7252
    73 /*
    74 ** Optional (a.out) header
    75 */
    76 
    77 typedef struct external_aouthdr
    78 {
    79   char  magic[2];              /* type of file                   */
    80   char  vstamp[2];            /* version stamp                  */
    81   char  tsize[4];              /* text size in bytes, padded to FW bdry*/
    82   char  dsize[4];              /* initialized data "  "         */
    83   char  bsize[4];              /* uninitialized data "   "           */
    84   char  entry[4];              /* entry pt.                         */
    85   char  text_start[4];    /* base of text used for this file */
    86   char  data_start[4];    /* base of data used for this file */
    87 } AOUTHDR;
    88 
    89 #define AOUTSZ 28
    90 #define AOUTHDRSZ 28
    9153
    9254/* aouthdr magic numbers */
     
    9456#define SHMAGIC 0406            /* NYU/Ultra3 shared data executable
    9557                                   (writable text) */
    96 
     58#undef  _ETEXT
    9759#define _ETEXT          "_etext"
    9860
    9961/*--------------------------------------------------------------*/
    10062
    101 /*
    102 ** Section header and related definitions
    103 */
    10463
    105 struct external_scnhdr
    106 {
    107         char        s_name[8];      /* section name              */
    108         char        s_paddr[4];     /* physical address, aliased s_nlib */
    109         char        s_vaddr[4];     /* virtual address        */
    110         char        s_size[4];      /* section size              */
    111         char        s_scnptr[4];    /* file ptr to raw data for section */
    112         char        s_relptr[4];    /* file ptr to relocation       */
    113         char        s_lnnoptr[4];   /* file ptr to line numbers     */
    114         char        s_nreloc[2];    /* number of relocation entries */
    115         char        s_nlnno[2];     /* number of line number entries*/
    116         char        s_flags[4];     /* flags                    */
    117 };
    118 
    119 #define SCNHDR  struct  external_scnhdr
    120 #define SCNHSZ  40
    121 
    122 /*
    123  * names of "special" sections
    124  */
    125 #define _TEXT   ".text"
    126 #define _DATA   ".data"
    127 #define _BSS    ".bss"
     64/* More names of "special" sections.  */
    12865#define _LIT    ".lit"
    12966
     
    15188*/
    15289
    153 struct external_reloc {
     90struct external_reloc
     91{
    15492  char r_vaddr[4];      /* (virtual) address of reference */
    15593  char r_symndx[4];     /* index into symbol table */
     
    200138/*--------------------------------------------------------------*/
    201139
    202 /*
    203 ** Line number entry declaration and related definitions
    204 */
    205 
    206 struct external_lineno
    207 {
    208    union {
    209          char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/
    210          char l_paddr[4];  /* (physical) address of line number    */
    211    } l_addr;
    212    char l_lnno[2];      /* line number    */
    213 };
    214 
    215 #define LINENO          struct external_lineno
    216 #define LINESZ          6               /* sizeof (LINENO) */
    217 
    218 /*--------------------------------------------------------------*/
    219 
    220 /*
    221 ** Symbol entry declaration and related definitions
    222 */
    223 
    224 #define E_SYMNMLEN      8       /* Number of characters in a symbol name */
    225 
    226 struct external_syment
    227 {
    228   union {
    229     char e_name[E_SYMNMLEN];
    230     struct {
    231       char e_zeroes[4];
    232       char e_offset[4];
    233     } e;
    234   } e;
    235   char e_value[4];
    236   char e_scnum[2];
    237   char e_type[2];
    238   char e_sclass[1];
    239   char e_numaux[1];
    240 };
    241 
    242 #define SYMENT  struct external_syment
    243 #define SYMESZ  18
    244 
    245140/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
    246141
     
    252147#define C_EXTREG        20              /* external global register */
    253148#define C_DEFREG        21              /* ext. def. of global register */
    254 
    255 
    256 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
    257 
    258 /*
    259 ** Derived symbol mask/shifts.
    260 */
    261 
    262 #define N_BTMASK        (0xf)
    263 #define N_BTSHFT        (4)
    264 #define N_TMASK         (0x30)
    265 #define N_TSHIFT        (2)
    266 
    267 /*--------------------------------------------------------------*/
    268 
    269 /*
    270 ** Auxiliary symbol table entry declaration and related
    271 ** definitions.
    272 */
    273 
    274 #define E_FILNMLEN      14      /* # characters in a file name    */
    275 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    276 
    277 union external_auxent {
    278         struct {
    279                 char x_tagndx[4];       /* str, un, or enum tag indx */
    280                 union {
    281                         struct {
    282                             char  x_lnno[2]; /* declaration line number */
    283                             char  x_size[2]; /* str/union/array size */
    284                         } x_lnsz;
    285                         char x_fsize[4];        /* size of function */
    286                 } x_misc;
    287                 union {
    288                         struct {                /* if ISFCN, tag, or .bb */
    289                             char x_lnnoptr[4];  /* ptr to fcn line # */
    290                             char x_endndx[4];   /* entry ndx past block end */
    291                         } x_fcn;
    292                         struct {                /* if ISARY, up to 4 dimen. */
    293                             char x_dimen[E_DIMNUM][2];
    294                         } x_ary;
    295                 } x_fcnary;
    296                 char x_tvndx[2];                /* tv index */
    297         } x_sym;
    298 
    299         union {
    300                 char x_fname[E_FILNMLEN];
    301                 struct {
    302                         char x_zeroes[4];
    303                         char x_offset[4];
    304                 } x_n;
    305         } x_file;
    306 
    307         struct {
    308                 char x_scnlen[4];                      /* section length */
    309                 char x_nreloc[2];       /* # relocation entries */
    310                 char x_nlinno[2];       /* # line numbers */
    311         } x_scn;
    312 
    313         struct {
    314                 char x_tvfill[4];       /* tv fill value */
    315                 char x_tvlen[2];        /* length of .tv */
    316                 char x_tvran[2][2];     /* tv range */
    317         } x_tv;  /* info about .tv section (in auxent of symbol .tv)) */
    318 };
    319 
    320 #define AUXENT          union external_auxent
    321 #define AUXESZ          18     
  • branches/GNU/src/binutils/include/coff/alpha.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2020/********************** FILE HEADER **********************/
    2121
    22 struct external_filehdr {
     22struct external_filehdr
     23{
    2324  unsigned char f_magic[2];     /* magic number                 */
    2425  unsigned char f_nscns[2];     /* number of sections           */
     
    4445
    4546/********************** AOUT "OPTIONAL HEADER" **********************/
    46 
    4747
    4848typedef struct external_aouthdr
     
    7171/********************** SECTION HEADER **********************/
    7272
    73 struct external_scnhdr {
     73struct external_scnhdr
     74{
    7475  unsigned char s_name[8];      /* section name                 */
    7576  unsigned char s_paddr[8];     /* physical address, aliased s_nlib */
     
    8990/********************** RELOCATION DIRECTIVES **********************/
    9091
    91 struct external_reloc {
     92struct external_reloc
     93{
    9294  unsigned char r_vaddr[8];
    9395  unsigned char r_symndx[4];
     
    167169/* File header as a set of bytes */
    168170
    169 struct hdr_ext {
     171struct hdr_ext
     172{
    170173        unsigned char   h_magic[2];
    171174        unsigned char   h_vstamp[2];
     
    197200/* File descriptor external record */
    198201
    199 struct fdr_ext {
     202struct fdr_ext
     203{
    200204        unsigned char   f_adr[8];
    201205        unsigned char   f_cbLineOffset[8];
  • branches/GNU/src/binutils/include/coff/apollo.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
     19#define DO_NOT_DEFINE_AOUTHDR
     20#define L_LNNO_SIZE 2
     21#include "coff/external.h"
    3122
    3223/* Motorola 68000/68008/68010/68020 */
     
    4839  ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC)  && \
    4940  ((x).f_magic!=APOLLOM68KMAGIC) )
    50 
    51 
    52 #define FILHDR  struct external_filehdr
    53 #define FILHSZ  20
    54 
    5541
    5642/********************** AOUT "OPTIONAL HEADER" **********************/
     
    7662#define AOUTSZ 44
    7763
     64/* Apollo allowa for larger section names by allowing
     65   them to be in the string table.  */
    7866
    79 
    80 /********************** SECTION HEADER **********************/
    81 
    82 struct external_scnhdr {
    83         /* Apollo allow for larger section names by  allowing it to be in
    84          * the string table.
    85          */
    86         char            s_name[8];
    87         char            s_paddr[4];     /* physical address, aliased s_nlib */
    88         char            s_vaddr[4];     /* virtual address              */
    89         char            s_size[4];      /* section size                 */
    90         char            s_scnptr[4];    /* file ptr to raw data for section */
    91         char            s_relptr[4];    /* file ptr to relocation       */
    92         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    93         char            s_nreloc[2];    /* number of relocation entries */
    94         char            s_nlnno[2];     /* number of line number entries*/
    95         char            s_flags[4];     /* flags                        */
    96 };
    97 
    98 /* If s_zeores is all zeroes, s_offset gives the real location of the name
    99  * in the string table.
    100  */
     67/* If s_zeores is all zeroes, s_offset gives the real
     68   location of the name in the string table.  */
    10169
    10270#define s_zeroes section_name.s_name
    10371#define s_offset (section_name.s_name+4)
    10472
    105 /*
    106  * names of "special" sections
    107  */
    108 #define _TEXT   ".text"
    109 #define _DATA   ".data"
    110 #define _BSS    ".bss"
     73/* More names of "special" sections.  */
    11174#define _TV     ".tv"
    11275#define _INIT   ".init"
     
    12386#define _UNWIND ".unwind"               /* Stack unwind information */
    12487
    125 #define SCNHDR  struct external_scnhdr
    126 #define SCNHSZ  40
    127 
    128 
    129 /********************** LINE NUMBERS **********************/
    130 
    131 /* 1 line number entry for every "breakpointable" source line in a section.
    132  * Line numbers are grouped on a per function basis; first entry in a function
    133  * grouping will have l_lnno = 0 and in place of physical address will be the
    134  * symbol table index of the function name.
    135  */
    136 struct external_lineno {
    137         union {
    138                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    139                 char l_paddr[4];        /* (physical) address of line number    */
    140         } l_addr;
    141         char l_lnno[2]; /* line number          */
    142 };
    143 
    144 
    145 #define LINENO  struct external_lineno
    146 #define LINESZ  6
    147 
    148 
    149 /********************** SYMBOLS **********************/
    150 
    151 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    152 #define E_FILNMLEN      14      /* # characters in a file name          */
    153 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    154 
    155 struct external_syment
    156 {
    157   union {
    158     char e_name[E_SYMNMLEN];
    159     struct {
    160       char e_zeroes[4];
    161       char e_offset[4];
    162     } e;
    163   } e;
    164   char e_value[4];
    165   char e_scnum[2];
    166   char e_type[2];
    167   char e_sclass[1];
    168   char e_numaux[1];
    169 };
    170 
    171 
    172 
    173 #define N_BTMASK        (017)
    174 #define N_TMASK         (060)
    175 #define N_BTSHFT        (4)
    176 #define N_TSHIFT        (2)
    177  
    178 
    179 union external_auxent {
    180         struct {
    181                 char x_tagndx[4];       /* str, un, or enum tag indx */
    182                 union {
    183                         struct {
    184                             char  x_lnno[2]; /* declaration line number */
    185                             char  x_size[2]; /* str/union/array size */
    186                         } x_lnsz;
    187                         char x_fsize[4];        /* size of function */
    188                 } x_misc;
    189                 union {
    190                         struct {                /* if ISFCN, tag, or .bb */
    191                             char x_lnnoptr[4];  /* ptr to fcn line # */
    192                             char x_endndx[4];   /* entry ndx past block end */
    193                         } x_fcn;
    194                         struct {                /* if ISARY, up to 4 dimen. */
    195                             char x_dimen[E_DIMNUM][2];
    196                         } x_ary;
    197                 } x_fcnary;
    198                 char x_tvndx[2];                /* tv index */
    199         } x_sym;
    200 
    201         union {
    202                 char x_fname[E_FILNMLEN];
    203                 struct {
    204                         char x_zeroes[4];
    205                         char x_offset[4];
    206                 } x_n;
    207         } x_file;
    208 
    209         struct {
    210                 char x_scnlen[4];                       /* section length */
    211                 char x_nreloc[2];       /* # relocation entries */
    212                 char x_nlinno[2];       /* # line numbers */
    213         } x_scn;
    214 
    215         struct {
    216                 char x_tvfill[4];       /* tv fill value */
    217                 char x_tvlen[2];        /* length of .tv */
    218                 char x_tvran[2][2];     /* tv range */
    219         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    220 
    221 
    222 };
    223 
    224 #define SYMENT  struct external_syment
    225 #define SYMESZ  18     
    226 #define AUXENT  union external_auxent
    227 #define AUXESZ  18
    228 
    229 
    230 
    23188/********************** RELOCATION DIRECTIVES **********************/
    23289
    233 
    234 struct external_reloc {
     90struct external_reloc
     91{
    23592  char r_vaddr[4];
    23693  char r_symndx[4];
     
    24198
    24299};
    243 
    244100
    245101#define RELOC struct external_reloc
  • 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, 2002 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#define F_VFP_FLOAT     (0x4000)
    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#define ARM_NOTE_SECTION ".note"
  • branches/GNU/src/binutils/include/coff/ecoff.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    33   symconst.h.
    44
    5    Copyright 2001 Free Software Foundation, Inc.
     5   Copyright 2001, 2002 Free Software Foundation, Inc.
    66
    77   This program is free software; you can redistribute it and/or modify
     
    99   the Free Software Foundation; either version 2 of the License, or
    1010   (at your option) any later version.
    11    
     11
    1212   This program is distributed in the hope that it will be useful,
    1313   but WITHOUT ANY WARRANTY; without even the implied warranty of
    1414   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1515   GNU General Public License for more details.
    16    
     16
    1717   You should have received a copy of the GNU General Public License
    1818   along with this program; if not, write to the Free Software
    1919   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    20    
     20
    2121#ifndef ECOFF_H
    2222#define ECOFF_H
     
    431431     ecoff_debug_info structure.  The section argument is used for
    432432     ELF, not straight ECOFF.  */
    433   boolean (*read_debug_info) PARAMS ((bfd *, asection *,
    434                                       struct ecoff_debug_info *));
     433  bfd_boolean (*read_debug_info)
     434    PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
    435435};
    436436
  • branches/GNU/src/binutils/include/coff/go32exe.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1919#define STUBSIZE 2048
    2020
    21 struct external_filehdr_go32_exe {
    22         char stub[STUBSIZE];    /* the stub to load the image   */
    23         /* the standard COFF header */
    24         char f_magic[2];        /* magic number                 */
    25         char f_nscns[2];        /* number of sections           */
    26         char f_timdat[4];       /* time & date stamp            */
    27         char f_symptr[4];       /* file pointer to symtab       */
    28         char f_nsyms[4];        /* number of symtab entries     */
    29         char f_opthdr[2];       /* sizeof(optional hdr)         */
    30         char f_flags[2];        /* flags                        */
    31 };
     21struct external_filehdr_go32_exe
     22  {
     23    char stub[STUBSIZE];/* the stub to load the image   */
     24                        /* the standard COFF header     */
     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  };
    3233
    3334#undef FILHDR
  • branches/GNU/src/binutils/include/coff/h8300.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 /* coff information for Hitachi H8/300 and H8/300-H
     1/* coff information for Renesas H8/300 and H8/300-H
    22
    3    Copyright 2001 Free Software Foundation, Inc.
     3   Copyright 2001, 2003 Free Software Foundation, Inc.
    44
    55   This program is free software; you can redistribute it and/or modify
     
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
    31 
     19#define L_LNNO_SIZE 4
     20#include "coff/external.h"
    3221
    3322#define H8300MAGIC      0x8300
    3423#define H8300HMAGIC     0x8301
    3524#define H8300SMAGIC     0x8302
     25#define H8300HNMAGIC    0x8303
     26#define H8300SNMAGIC    0x8304
    3627
    37 #define H8300BADMAG(x) (((x).f_magic!=H8300MAGIC))
    38 #define H8300HBADMAG(x) (((x).f_magic!=H8300HMAGIC))
    39 #define H8300SBADMAG(x) (((x).f_magic!=H8300SMAGIC))
     28#define H8300BADMAG(x)   (((x).f_magic != H8300MAGIC))
     29#define H8300HBADMAG(x)  (((x).f_magic != H8300HMAGIC))
     30#define H8300SBADMAG(x)  (((x).f_magic != H8300SMAGIC))
     31#define H8300HNBADMAG(x) (((x).f_magic != H8300HNMAGIC))
     32#define H8300SNBADMAG(x) (((x).f_magic != H8300SNMAGIC))
    4033
    41 #define FILHDR  struct external_filehdr
    42 #define FILHSZ  20
    43 
    44 
    45 /********************** AOUT "OPTIONAL HEADER" **********************/
    46 
    47 
    48 typedef struct
    49 {
    50   char  magic[2];               /* type of file                         */
    51   char  vstamp[2];              /* version stamp                        */
    52   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    53   char  dsize[4];               /* initialized data "  "                */
    54   char  bsize[4];               /* uninitialized data "   "             */
    55   char  entry[4];               /* entry pt.                            */
    56   char  text_start[4];          /* base of text used for this file */
    57   char  data_start[4];          /* base of data used for this file */
    58 }
    59 AOUTHDR;
    60 
    61 
    62 #define AOUTHDRSZ 28
    63 #define AOUTSZ 28
    64 
    65 
    66 
    67 
    68 /********************** SECTION HEADER **********************/
    69 
    70 
    71 struct external_scnhdr {
    72         char            s_name[8];      /* section name                 */
    73         char            s_paddr[4];     /* physical address, aliased s_nlib */
    74         char            s_vaddr[4];     /* virtual address              */
    75         char            s_size[4];      /* section size                 */
    76         char            s_scnptr[4];    /* file ptr to raw data for section */
    77         char            s_relptr[4];    /* file ptr to relocation       */
    78         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    79         char            s_nreloc[2];    /* number of relocation entries */
    80         char            s_nlnno[2];     /* number of line number entries*/
    81         char            s_flags[4];     /* flags                        */
    82 };
    83 
    84 /*
    85  * names of "special" sections
    86  */
    87 #define _TEXT   ".text"
    88 #define _DATA   ".data"
    89 #define _BSS    ".bss"
    90 
    91 
    92 #define SCNHDR  struct external_scnhdr
    93 #define SCNHSZ  40
    94 
    95 
    96 /********************** LINE NUMBERS **********************/
    97 
    98 /* 1 line number entry for every "breakpointable" source line in a section.
    99  * Line numbers are grouped on a per function basis; first entry in a function
    100  * grouping will have l_lnno = 0 and in place of physical address will be the
    101  * symbol table index of the function name.
    102  */
    103 struct external_lineno {
    104         union {
    105                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    106                 char l_paddr[4];        /* (physical) address of line number    */
    107         } l_addr;
    108         char l_lnno[4]; /* line number          */
    109 };
    110 
    111 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
    112 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val,  (bfd_byte *) (ext->l_lnno));
    113 
    114 #define LINENO  struct external_lineno
    115 #define LINESZ  8
    116 
    117 
    118 /********************** SYMBOLS **********************/
    119 
    120 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    121 #define E_FILNMLEN      14      /* # characters in a file name          */
    122 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    123 
    124 struct external_syment
    125 {
    126   union {
    127     char e_name[E_SYMNMLEN];
    128     struct {
    129       char e_zeroes[4];
    130       char e_offset[4];
    131     } e;
    132   } e;
    133   char e_value[4];
    134   char e_scnum[2];
    135   char e_type[2];
    136   char e_sclass[1];
    137   char e_numaux[1];
    138 };
    139 
    140 
    141 
    142 #define N_BTMASK        (017)
    143 #define N_TMASK         (060)
    144 #define N_BTSHFT        (4)
    145 #define N_TSHIFT        (2)
    146  
    147 
    148 union external_auxent {
    149         struct {
    150                 char x_tagndx[4];       /* str, un, or enum tag indx */
    151                 union {
    152                         struct {
    153                             char  x_lnno[2]; /* declaration line number */
    154                             char  x_size[2]; /* str/union/array size */
    155                         } x_lnsz;
    156                         char x_fsize[4];        /* size of function */
    157                 } x_misc;
    158                 union {
    159                         struct {                /* if ISFCN, tag, or .bb */
    160                             char x_lnnoptr[4];  /* ptr to fcn line # */
    161                             char x_endndx[4];   /* entry ndx past block end */
    162                         } x_fcn;
    163                         struct {                /* if ISARY, up to 4 dimen. */
    164                             char x_dimen[E_DIMNUM][2];
    165                         } x_ary;
    166                 } x_fcnary;
    167                 char x_tvndx[2];                /* tv index */
    168         } x_sym;
    169 
    170         union {
    171                 char x_fname[E_FILNMLEN];
    172                 struct {
    173                         char x_zeroes[4];
    174                         char x_offset[4];
    175                 } x_n;
    176         } x_file;
    177 
    178         struct {
    179                 char x_scnlen[4];                       /* section length */
    180                 char x_nreloc[2];       /* # relocation entries */
    181                 char x_nlinno[2];       /* # line numbers */
    182         } x_scn;
    183 
    184         struct {
    185                 char x_tvfill[4];       /* tv fill value */
    186                 char x_tvlen[2];        /* length of .tv */
    187                 char x_tvran[2][2];     /* tv range */
    188         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    189 
    190 
    191 };
    192 
    193 #define SYMENT  struct external_syment
    194 #define SYMESZ  18     
    195 #define AUXENT  union external_auxent
    196 #define AUXESZ  18
    197 
    198 
    199 
    200 /********************** RELOCATION DIRECTIVES **********************/
     34/* Relocation directives.  */
    20135
    20236/* The external reloc has an offset field, because some of the reloc
    20337   types on the h8 don't have room in the instruction for the entire
    204    offset - eg the strange jump and high page addressing modes */
     38   offset - eg the strange jump and high page addressing modes. */
    20539
    206 struct external_reloc {
     40struct external_reloc
     41{
    20742  char r_vaddr[4];
    20843  char r_symndx[4];
     
    21247};
    21348
    214 
    21549#define RELOC struct external_reloc
    21650#define RELSZ 16
  • branches/GNU/src/binutils/include/coff/h8500.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 /* coff information for Hitachi H8/500
     1/* coff information for Renesas H8/500
    22   
    3    Copyright 2001 Free Software Foundation, Inc.
     3   Copyright 2001, 2003 Free Software Foundation, Inc.
    44
    55   This program is free software; you can redistribute it and/or modify
     
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
    31 
     19#define L_LNNO_SIZE 4
     20#include "coff/external.h"
    3221
    3322#define H8500MAGIC      0x8500
    3423
    35 
    36 #define H8500BADMAG(x) ((0xffff && ((x).f_magic)!=H8500MAGIC))
    37 
    38 #define FILHDR  struct external_filehdr
    39 #define FILHSZ  20
    40 
    41 
    42 /********************** AOUT "OPTIONAL HEADER" **********************/
    43 
    44 
    45 typedef struct
    46 {
    47   char  magic[2];               /* type of file                         */
    48   char  vstamp[2];              /* version stamp                        */
    49   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    50   char  dsize[4];               /* initialized data "  "                */
    51   char  bsize[4];               /* uninitialized data "   "             */
    52   char  entry[4];               /* entry pt.                            */
    53   char  text_start[4];          /* base of text used for this file */
    54   char  data_start[4];          /* base of data used for this file */
    55 }
    56 AOUTHDR;
    57 
    58 
    59 #define AOUTHDRSZ 28
    60 #define AOUTSZ 28
    61 
    62 
    63 
    64 
    65 /********************** SECTION HEADER **********************/
    66 
    67 
    68 struct external_scnhdr {
    69         char            s_name[8];      /* section name                 */
    70         char            s_paddr[4];     /* physical address, aliased s_nlib */
    71         char            s_vaddr[4];     /* virtual address              */
    72         char            s_size[4];      /* section size                 */
    73         char            s_scnptr[4];    /* file ptr to raw data for section */
    74         char            s_relptr[4];    /* file ptr to relocation       */
    75         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    76         char            s_nreloc[2];    /* number of relocation entries */
    77         char            s_nlnno[2];     /* number of line number entries*/
    78         char            s_flags[4];     /* flags                        */
    79 };
    80 
    81 /*
    82  * names of "special" sections
    83  */
    84 #define _TEXT   ".text"
    85 #define _DATA   ".data"
    86 #define _BSS    ".bss"
    87 
    88 
    89 #define SCNHDR  struct external_scnhdr
    90 #define SCNHSZ  40
    91 
    92 
    93 /********************** LINE NUMBERS **********************/
    94 
    95 /* 1 line number entry for every "breakpointable" source line in a section.
    96  * Line numbers are grouped on a per function basis; first entry in a function
    97  * grouping will have l_lnno = 0 and in place of physical address will be the
    98  * symbol table index of the function name.
    99  */
    100 struct external_lineno {
    101         union {
    102                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    103                 char l_paddr[4];        /* (physical) address of line number    */
    104         } l_addr;
    105         char l_lnno[4]; /* line number          */
    106 };
    107 
    108 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
    109 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val,  (bfd_byte *) (ext->l_lnno));
    110 
    111 #define LINENO  struct external_lineno
    112 #define LINESZ  8
    113 
    114 
    115 /********************** SYMBOLS **********************/
    116 
    117 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    118 #define E_FILNMLEN      14      /* # characters in a file name          */
    119 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    120 
    121 struct external_syment
    122 {
    123   union {
    124     char e_name[E_SYMNMLEN];
    125     struct {
    126       char e_zeroes[4];
    127       char e_offset[4];
    128     } e;
    129   } e;
    130   char e_value[4];
    131   char e_scnum[2];
    132   char e_type[2];
    133   char e_sclass[1];
    134   char e_numaux[1];
    135 };
    136 
    137 
    138 
    139 #define N_BTMASK        (017)
    140 #define N_TMASK         (060)
    141 #define N_BTSHFT        (4)
    142 #define N_TSHIFT        (2)
    143  
    144 
    145 union external_auxent {
    146         struct {
    147                 char x_tagndx[4];       /* str, un, or enum tag indx */
    148                 union {
    149                         struct {
    150                             char  x_lnno[2]; /* declaration line number */
    151                             char  x_size[2]; /* str/union/array size */
    152                         } x_lnsz;
    153                         char x_fsize[4];        /* size of function */
    154                 } x_misc;
    155                 union {
    156                         struct {                /* if ISFCN, tag, or .bb */
    157                             char x_lnnoptr[4];  /* ptr to fcn line # */
    158                             char x_endndx[4];   /* entry ndx past block end */
    159                         } x_fcn;
    160                         struct {                /* if ISARY, up to 4 dimen. */
    161                             char x_dimen[E_DIMNUM][2];
    162                         } x_ary;
    163                 } x_fcnary;
    164                 char x_tvndx[2];                /* tv index */
    165         } x_sym;
    166 
    167         union {
    168                 char x_fname[E_FILNMLEN];
    169                 struct {
    170                         char x_zeroes[4];
    171                         char x_offset[4];
    172                 } x_n;
    173         } x_file;
    174 
    175         struct {
    176                 char x_scnlen[4];                       /* section length */
    177                 char x_nreloc[2];       /* # relocation entries */
    178                 char x_nlinno[2];       /* # line numbers */
    179         } x_scn;
    180 
    181         struct {
    182                 char x_tvfill[4];       /* tv fill value */
    183                 char x_tvlen[2];        /* length of .tv */
    184                 char x_tvran[2][2];     /* tv range */
    185         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    186 
    187 
    188 };
    189 
    190 #define SYMENT  struct external_syment
    191 #define SYMESZ  18     
    192 #define AUXENT  union external_auxent
    193 #define AUXESZ  18
    194 
    195 
     24#define H8500BADMAG(x) ((0xffff && ((x).f_magic) != H8500MAGIC))
    19625
    19726/********************** RELOCATION DIRECTIVES **********************/
     
    19928/* The external reloc has an offset field, because some of the reloc
    20029   types on the h8 don't have room in the instruction for the entire
    201    offset - eg the strange jump and high page addressing modes */
     30   offset - eg the strange jump and high page addressing modes. */
    20231
    203 struct external_reloc {
     32struct external_reloc
     33{
    20434  char r_vaddr[4];
    20535  char r_symndx[4];
     
    20939};
    21040
    211 
    21241#define RELOC struct external_reloc
    21342#define RELSZ 16
  • branches/GNU/src/binutils/include/coff/i386.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 
    20 /********************** FILE HEADER **********************/
    21 
    22 struct external_filehdr {
    23         char f_magic[2];        /* magic number                 */
    24         char f_nscns[2];        /* number of sections           */
    25         char f_timdat[4];       /* time & date stamp            */
    26         char f_symptr[4];       /* file pointer to symtab       */
    27         char f_nsyms[4];        /* number of symtab entries     */
    28         char f_opthdr[2];       /* sizeof(optional hdr)         */
    29         char f_flags[2];        /* flags                        */
    30 };
     19#define L_LNNO_SIZE 2
     20#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     21#include "coff/external.h"
    3122
    3223/* Bits for f_flags:
    33  *      F_RELFLG        relocation info stripped from file
    34  *      F_EXEC          file is executable (no unresolved external references)
    35  *      F_LNNO          line numbers stripped from file
    36  *      F_LSYMS         local symbols stripped from file
    37  *      F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax)
    38  */
     24        F_RELFLG        relocation info stripped from file
     25        F_EXEC          file is executable (no unresolved external references)
     26        F_LNNO          line numbers stripped from file
     27        F_LSYMS         local symbols stripped from file
     28        F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax).  */
    3929
    4030#define F_RELFLG        (0x0001)
     
    4232#define F_LNNO          (0x0004)
    4333#define F_LSYMS         (0x0008)
    44 
    45 
    4634
    4735#define I386MAGIC       0x14c
     
    5341#define LYNXCOFFMAGIC   0415
    5442
    55 #define I386BADMAG(x) (((x).f_magic != I386MAGIC) \
     43#define I386BADMAG(x) (  ((x).f_magic != I386MAGIC) \
    5644                       && (x).f_magic != I386AIXMAGIC \
    5745                       && (x).f_magic != I386PTXMAGIC \
    5846                       && (x).f_magic != LYNXCOFFMAGIC)
    59 
    60 #define FILHDR  struct external_filehdr
    61 #define FILHSZ  20
    62 
    63 
    64 /********************** AOUT "OPTIONAL HEADER" **********************/
    65 
    66 
    67 typedef struct
    68 {
    69   char  magic[2];               /* type of file                         */
    70   char  vstamp[2];              /* version stamp                        */
    71   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    72   char  dsize[4];               /* initialized data "  "                */
    73   char  bsize[4];               /* uninitialized data "   "             */
    74   char  entry[4];               /* entry pt.                            */
    75   char  text_start[4];          /* base of text used for this file */
    76   char  data_start[4];          /* base of data used for this file */
    77 
    78 
    79 }
    80 AOUTHDR;
    81 
    82 
    83 #define AOUTSZ 28
    84 #define AOUTHDRSZ 28
    8547
    8648#define OMAGIC          0404    /* object files, eg as output */
     
    8850#define STMAGIC         0401    /* target shlib */
    8951#define SHMAGIC         0443    /* host   shlib */
    90 
    9152
    9253/* define some NT default values */
     
    9758#define NT_DEF_COMMIT        0x1000
    9859
    99 /********************** SECTION HEADER **********************/
    100 
    101 
    102 struct external_scnhdr {
    103         char            s_name[8];      /* section name                 */
    104         char            s_paddr[4];     /* physical address, aliased s_nlib */
    105         char            s_vaddr[4];     /* virtual address              */
    106         char            s_size[4];      /* section size                 */
    107         char            s_scnptr[4];    /* file ptr to raw data for section */
    108         char            s_relptr[4];    /* file ptr to relocation       */
    109         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    110         char            s_nreloc[2];    /* number of relocation entries */
    111         char            s_nlnno[2];     /* number of line number entries*/
    112         char            s_flags[4];     /* flags                        */
    113 };
    114 
    115 #define SCNHDR  struct external_scnhdr
    116 #define SCNHSZ  40
    117 
    118 /*
    119  * names of "special" sections
    120  */
    121 #define _TEXT   ".text"
    122 #define _DATA   ".data"
    123 #define _BSS    ".bss"
    124 #define _COMMENT ".comment"
    125 #define _LIB ".lib"
    126 
    127 /********************** LINE NUMBERS **********************/
    128 
    129 /* 1 line number entry for every "breakpointable" source line in a section.
    130  * Line numbers are grouped on a per function basis; first entry in a function
    131  * grouping will have l_lnno = 0 and in place of physical address will be the
    132  * symbol table index of the function name.
    133  */
    134 struct external_lineno {
    135         union {
    136                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    137                 char l_paddr[4];        /* (physical) address of line number    */
    138         } l_addr;
    139         char l_lnno[2]; /* line number          */
    140 };
    141 
    142 
    143 #define LINENO  struct external_lineno
    144 #define LINESZ  6
    145 
    146 
    147 /********************** SYMBOLS **********************/
    148 
    149 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    150 #define E_FILNMLEN      14      /* # characters in a file name          */
    151 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    152 
    153 struct external_syment
    154 {
    155   union {
    156     char e_name[E_SYMNMLEN];
    157     struct {
    158       char e_zeroes[4];
    159       char e_offset[4];
    160     } e;
    161   } e;
    162   char e_value[4];
    163   char e_scnum[2];
    164   char e_type[2];
    165   char e_sclass[1];
    166   char e_numaux[1];
    167 };
    168 
    169 #define N_BTMASK        (0xf)
    170 #define N_TMASK         (0x30)
    171 #define N_BTSHFT        (4)
    172 #define N_TSHIFT        (2)
    173  
    174 union external_auxent {
    175         struct {
    176                 char x_tagndx[4];       /* str, un, or enum tag indx */
    177                 union {
    178                         struct {
    179                             char  x_lnno[2]; /* declaration line number */
    180                             char  x_size[2]; /* str/union/array size */
    181                         } x_lnsz;
    182                         char x_fsize[4];        /* size of function */
    183                 } x_misc;
    184                 union {
    185                         struct {                /* if ISFCN, tag, or .bb */
    186                             char x_lnnoptr[4];  /* ptr to fcn line # */
    187                             char x_endndx[4];   /* entry ndx past block end */
    188                         } x_fcn;
    189                         struct {                /* if ISARY, up to 4 dimen. */
    190                             char x_dimen[E_DIMNUM][2];
    191                         } x_ary;
    192                 } x_fcnary;
    193                 char x_tvndx[2];                /* tv index */
    194         } x_sym;
    195 
    196         union {
    197                 char x_fname[E_FILNMLEN];
    198                 struct {
    199                         char x_zeroes[4];
    200                         char x_offset[4];
    201                 } x_n;
    202         } x_file;
    203 
    204         struct {
    205                 char x_scnlen[4];       /* section length */
    206                 char x_nreloc[2];       /* # relocation entries */
    207                 char x_nlinno[2];       /* # line numbers */
    208                 char x_checksum[4];     /* section COMDAT checksum */
    209                 char x_associated[2];   /* COMDAT associated section index */
    210                 char x_comdat[1];       /* COMDAT selection number */
    211         } x_scn;
    212 
    213         struct {
    214                 char x_tvfill[4];       /* tv fill value */
    215                 char x_tvlen[2];        /* length of .tv */
    216                 char x_tvran[2][2];     /* tv range */
    217         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    218 
    219 
    220 };
    221 
    222 #define SYMENT  struct external_syment
    223 #define SYMESZ  18     
    224 #define AUXENT  union external_auxent
    225 #define AUXESZ  18
    226 
    227 
    228 #       define _ETEXT   "etext"
    229 
    230 
    23160/********************** RELOCATION DIRECTIVES **********************/
    23261
    233 
    234 
    235 struct external_reloc {
     62struct external_reloc
     63{
    23664  char r_vaddr[4];
    23765  char r_symndx[4];
     
    23967};
    24068
    241 
    24269#define RELOC struct external_reloc
    24370#define RELSZ 10
  • branches/GNU/src/binutils/include/coff/i860.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
     19/* This file was hacked from i386.h   [dolan@ssd.intel.com] */
    2020
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
     21#define L_LNNO_SIZE 2
     22#include "coff/external.h"
    3123
    3224/* Bits for f_flags:
    33  *      F_RELFLG        relocation info stripped from file
    34  *      F_EXEC          file is executable (no unresolved external references)
    35  *      F_LNNO          line numbers stripped from file
    36  *      F_LSYMS         local symbols stripped from file
    37  *      F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax)
    38  */
     25        F_RELFLG        relocation info stripped from file
     26        F_EXEC          file is executable (no unresolved external references)
     27        F_LNNO          line numbers stripped from file
     28        F_LSYMS         local symbols stripped from file
     29        F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax).  */
    3930
    4031#define F_RELFLG        (0x0001)
     
    4334#define F_LSYMS         (0x0008)
    4435
    45 
    46 
    4736#define I860MAGIC       0x14d
    4837
    4938#define I860BADMAG(x)   ((x).f_magic != I860MAGIC)
    5039
    51 #define FILHDR  struct external_filehdr
    52 #define FILHSZ  20
    53 
    54 
    55 /********************** AOUT "OPTIONAL HEADER" **********************/
    56 
    57 
    58 typedef struct
    59 {
    60   char  magic[2];               /* type of file                         */
    61   char  vstamp[2];              /* version stamp                        */
    62   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    63   char  dsize[4];               /* initialized data "  "                */
    64   char  bsize[4];               /* uninitialized data "   "             */
    65   char  entry[4];               /* entry pt.                            */
    66   char  text_start[4];          /* base of text used for this file */
    67   char  data_start[4];          /* base of data used for this file */
    68 }
    69 AOUTHDR;
    70 
    71 
    72 #define AOUTSZ 28
    73 #define AOUTHDRSZ 28
    74 
    7540/* FIXME: What are the a.out magic numbers?  */
    7641
    77 /********************** SECTION HEADER **********************/
    78 
    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 
    121 #define LINENO  struct external_lineno
    122 #define LINESZ  6
    123 
    124 
    125 /********************** SYMBOLS **********************/
    126 
    127 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    128 #define E_FILNMLEN      14      /* # characters in a file name          */
    129 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    130 
    131 struct external_syment
    132 {
    133   union {
    134     char e_name[E_SYMNMLEN];
    135     struct {
    136       char e_zeroes[4];
    137       char e_offset[4];
    138     } e;
    139   } e;
    140   char e_value[4];
    141   char e_scnum[2];
    142   char e_type[2];
    143   char e_sclass[1];
    144   char e_numaux[1];
    145 };
    146 
    147 #define N_BTMASK        (0xf)
    148 #define N_TMASK         (0x30)
    149 #define N_BTSHFT        (4)
    150 #define N_TSHIFT        (2)
    151  
    152 union external_auxent {
    153         struct {
    154                 char x_tagndx[4];       /* str, un, or enum tag indx */
    155                 union {
    156                         struct {
    157                             char  x_lnno[2]; /* declaration line number */
    158                             char  x_size[2]; /* str/union/array size */
    159                         } x_lnsz;
    160                         char x_fsize[4];        /* size of function */
    161                 } x_misc;
    162                 union {
    163                         struct {                /* if ISFCN, tag, or .bb */
    164                             char x_lnnoptr[4];  /* ptr to fcn line # */
    165                             char x_endndx[4];   /* entry ndx past block end */
    166                         } x_fcn;
    167                         struct {                /* if ISARY, up to 4 dimen. */
    168                             char x_dimen[E_DIMNUM][2];
    169                         } x_ary;
    170                 } x_fcnary;
    171                 char x_tvndx[2];                /* tv index */
    172         } x_sym;
    173 
    174         union {
    175                 char x_fname[E_FILNMLEN];
    176                 struct {
    177                         char x_zeroes[4];
    178                         char x_offset[4];
    179                 } x_n;
    180         } x_file;
    181 
    182         struct {
    183                 char x_scnlen[4];                       /* section length */
    184                 char x_nreloc[2];       /* # relocation entries */
    185                 char x_nlinno[2];       /* # line numbers */
    186         } x_scn;
    187 
    188         struct {
    189                 char x_tvfill[4];       /* tv fill value */
    190                 char x_tvlen[2];        /* length of .tv */
    191                 char x_tvran[2][2];     /* tv range */
    192         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    193 
    194 
    195 };
    196 
    197 #define SYMENT  struct external_syment
    198 #define SYMESZ  18     
    199 #define AUXENT  union external_auxent
    200 #define AUXESZ  18
    201 
    202 
    203 #       define _ETEXT   "etext"
    204 
     42#define _ETEXT  "etext"
    20543
    20644/********************** RELOCATION DIRECTIVES **********************/
    20745
    208 
    209 
    210 struct external_reloc {
     46struct external_reloc
     47{
    21148  char r_vaddr[4];
    21249  char r_symndx[4];
     
    21451};
    21552
    216 
    21753#define RELOC struct external_reloc
    21854#define RELSZ 10
  • branches/GNU/src/binutils/include/coff/i960.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2121/********************** FILE HEADER **********************/
    2222
    23 struct external_filehdr {
    24         char f_magic[2];        /* magic number                 */
    25         char f_nscns[2];        /* number of sections           */
    26         char f_timdat[4];       /* time & date stamp            */
    27         char f_symptr[4];       /* file pointer to symtab       */
    28         char f_nsyms[4];        /* number of symtab entries     */
    29         char f_opthdr[2];       /* sizeof(optional hdr)         */
    30         char f_flags[2];        /* flags                        */
     23struct external_filehdr
     24{
     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                        */
    3132};
    3233
     
    6667/********************** AOUT "OPTIONAL HEADER" **********************/
    6768
    68 typedef struct {
    69         unsigned long   phys_addr;
    70         unsigned long   bitarray;
     69typedef struct
     70{
     71  unsigned long phys_addr;
     72  unsigned long bitarray;
    7173} TAGBITS;
    72 
    73 
    7474
    7575typedef struct
     
    100100/********************** SECTION HEADER **********************/
    101101
    102 
    103 struct external_scnhdr {
    104         char            s_name[8];      /* section name                 */
    105         char            s_paddr[4];     /* physical address, aliased s_nlib */
    106         char            s_vaddr[4];     /* virtual address              */
    107         char            s_size[4];      /* section size                 */
    108         char            s_scnptr[4];    /* file ptr to raw data for section */
    109         char            s_relptr[4];    /* file ptr to relocation       */
    110         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    111         char            s_nreloc[2];    /* number of relocation entries */
    112         char            s_nlnno[2];     /* number of line number entries*/
    113         char            s_flags[4];     /* flags                        */
    114         char            s_align[4];     /* section alignment            */
     102struct external_scnhdr
     103{
     104  char          s_name[8];      /* section name                 */
     105  char          s_paddr[4];     /* physical address, aliased s_nlib */
     106  char          s_vaddr[4];     /* virtual address              */
     107  char          s_size[4];      /* section size                 */
     108  char          s_scnptr[4];    /* file ptr to raw data for section */
     109  char          s_relptr[4];    /* file ptr to relocation       */
     110  char          s_lnnoptr[4];   /* file ptr to line numbers     */
     111  char          s_nreloc[2];    /* number of relocation entries */
     112  char          s_nlnno[2];     /* number of line number entries*/
     113  char          s_flags[4];     /* flags                        */
     114  char          s_align[4];     /* section alignment            */
    115115};
    116116
     
    133133 * symbol table index of the function name.
    134134 */
    135 struct external_lineno {
    136         union {
    137                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    138                 char l_paddr[4];        /* (physical) address of line number    */
    139         } l_addr;
    140         char l_lnno[2];         /* line number          */
    141         char padding[2];        /* force alignment      */
     135struct external_lineno
     136{
     137  union
     138  {
     139    char l_symndx[4];   /* function name symbol index, iff l_lnno == 0*/
     140    char l_paddr[4];    /* (physical) address of line number    */
     141  } l_addr;
     142
     143  char l_lnno[2];               /* line number          */
     144  char padding[2];      /* force alignment      */
    142145};
    143146
     
    145148#define LINENO  struct external_lineno
    146149#define LINESZ  8
    147 
    148150
    149151/********************** SYMBOLS **********************/
     
    155157struct external_syment
    156158{
    157   union {
     159  union
     160  {
    158161    char e_name[E_SYMNMLEN];
    159     struct {
     162
     163    struct
     164    {
    160165      char e_zeroes[4];
    161166      char e_offset[4];
    162167    } e;
    163168  } e;
     169
    164170  char e_value[4];
    165171  char e_scnum[2];
     
    171177};
    172178
    173 
    174 
    175 
    176179#define N_BTMASK        (0x1f)
    177180#define N_TMASK         (0x60)
     
    179182#define N_TSHIFT        (2)
    180183 
    181 union external_auxent {
    182         struct {
    183                 char x_tagndx[4];       /* str, un, or enum tag indx */
    184                 union {
    185                         struct {
    186                             char  x_lnno[2]; /* declaration line number */
    187                             char  x_size[2]; /* str/union/array size */
    188                         } x_lnsz;
    189                         char x_fsize[4];        /* size of function */
    190                 } x_misc;
    191                 union {
    192                         struct {                /* if ISFCN, tag, or .bb */
    193                             char x_lnnoptr[4];  /* ptr to fcn line # */
    194                             char x_endndx[4];   /* entry ndx past block end */
    195                         } x_fcn;
    196                         struct {                /* if ISARY, up to 4 dimen. */
    197                             char x_dimen[E_DIMNUM][2];
    198                         } x_ary;
    199                 } x_fcnary;
    200                 char x_tvndx[2];                /* tv index */
    201         } x_sym;
    202 
    203         union {
    204                 char x_fname[E_FILNMLEN];
    205                 struct {
    206                         char x_zeroes[4];
    207                         char x_offset[4];
    208                 } x_n;
    209         } x_file;
    210 
    211         struct {
    212                 char x_scnlen[4];                       /* section length */
    213                 char x_nreloc[2];       /* # relocation entries */
    214                 char x_nlinno[2];       /* # line numbers */
    215         } x_scn;
    216 
    217         struct {
    218                 char x_tvfill[4];       /* tv fill value */
    219                 char x_tvlen[2];        /* length of .tv */
    220                 char x_tvran[2][2];     /* tv range */
    221         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    222 
    223         /******************************************
    224          *  I960-specific *2nd* aux. entry formats
    225          ******************************************/
    226         struct {
    227           /* This is a very old typo that keeps getting propagated. */
     184union external_auxent
     185{
     186  struct
     187  {
     188    char x_tagndx[4];   /* str, un, or enum tag indx */
     189
     190    union
     191    {
     192      struct
     193      {
     194        char  x_lnno[2]; /* declaration line number */
     195        char  x_size[2]; /* str/union/array size */
     196      } x_lnsz;
     197
     198      char x_fsize[4];  /* size of function */
     199
     200    } x_misc;
     201
     202    union
     203    {
     204      struct            /* if ISFCN, tag, or .bb */
     205      {
     206        char x_lnnoptr[4];      /* ptr to fcn line # */
     207        char x_endndx[4];       /* entry ndx past block end */
     208      } x_fcn;
     209
     210      struct            /* if ISARY, up to 4 dimen. */
     211      {
     212        char x_dimen[E_DIMNUM][2];
     213      } x_ary;
     214
     215    } x_fcnary;
     216
     217    char x_tvndx[2];            /* tv index */
     218
     219  } x_sym;
     220
     221  union
     222  {
     223    char x_fname[E_FILNMLEN];
     224
     225    struct
     226    {
     227      char x_zeroes[4];
     228      char x_offset[4];
     229    } x_n;
     230
     231  } x_file;
     232
     233  struct
     234  {
     235    char x_scnlen[4];                   /* section length */
     236    char x_nreloc[2];   /* # relocation entries */
     237    char x_nlinno[2];   /* # line numbers */
     238
     239  } x_scn;
     240
     241  struct
     242  {
     243    char x_tvfill[4];   /* tv fill value */
     244    char x_tvlen[2];    /* length of .tv */
     245    char x_tvran[2][2]; /* tv range */
     246
     247  } x_tv;               /* info about .tv section (in auxent of symbol .tv)) */
     248
     249  /******************************************
     250   *  I960-specific *2nd* aux. entry formats
     251   ******************************************/
     252  struct
     253  {
     254    /* This is a very old typo that keeps getting propagated. */
    228255#define x_stdindx x_stindx
    229                 char x_stindx[4];       /* sys. table entry */
    230         } x_sc; /* system call entry */
    231 
    232         struct {
    233                 char x_balntry[4]; /* BAL entry point */
    234         } x_bal; /* BAL-callable function */
    235 
    236         struct {
    237                 char x_timestamp[4];            /* time stamp */
    238                 char    x_idstring[20];         /* producer identity string */
    239         } x_ident;                              /* Producer ident info */
    240 
    241 };
    242 
    243 
     256    char x_stindx[4];   /* sys. table entry */
     257  } x_sc;       /* system call entry */
     258
     259  struct
     260  {
     261    char x_balntry[4]; /* BAL entry point */
     262  } x_bal; /* BAL-callable function */
     263
     264  struct
     265  {
     266    char x_timestamp[4];                /* time stamp */
     267    char        x_idstring[20];         /* producer identity string */
     268
     269  } x_ident;                            /* Producer ident info */
     270};
    244271
    245272#define SYMENT  struct external_syment
     
    252279/********************** RELOCATION DIRECTIVES **********************/
    253280
    254 struct external_reloc {
     281struct external_reloc
     282{
    255283  char r_vaddr[4];
    256284  char r_symndx[4];
  • branches/GNU/src/binutils/include/coff/ia64.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 
    20 /********************** FILE HEADER **********************/
    21 
    22 struct external_filehdr {
    23         char f_magic[2];        /* magic number                 */
    24         char f_nscns[2];        /* number of sections           */
    25         char f_timdat[4];       /* time & date stamp            */
    26         char f_symptr[4];       /* file pointer to symtab       */
    27         char f_nsyms[4];        /* number of symtab entries     */
    28         char f_opthdr[2];       /* sizeof(optional hdr)         */
    29         char f_flags[2];        /* flags                        */
    30 };
     19#define DO_NOT_DEFINE_AOUTHDR
     20#define L_LNNO_SIZE 2
     21#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     22#include "coff/external.h"
    3123
    3224#define IA64MAGIC       0x200
     
    4739#define F_LSYMS         (0x0008)
    4840
    49 
    50 #define FILHDR  struct external_filehdr
    51 #define FILHSZ  20
    52 
    53 
    5441/********************** AOUT "OPTIONAL HEADER" **********************/
    55 
    56 
    5742typedef struct
    5843{
     
    8368#define SHMAGIC         0443    /* host   shlib */
    8469
    85 
    8670/* define some NT default values */
    8771/*  #define NT_IMAGE_BASE        0x400000 moved to internal.h */
     
    9175#define NT_DEF_COMMIT        0x1000
    9276
    93 /********************** SECTION HEADER **********************/
    94 
    95 
    96 struct external_scnhdr {
    97         char            s_name[8];      /* section name                 */
    98         char            s_paddr[4];     /* physical address, aliased s_nlib */
    99         char            s_vaddr[4];     /* virtual address              */
    100         char            s_size[4];      /* section size                 */
    101         char            s_scnptr[4];    /* file ptr to raw data for section */
    102         char            s_relptr[4];    /* file ptr to relocation       */
    103         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    104         char            s_nreloc[2];    /* number of relocation entries */
    105         char            s_nlnno[2];     /* number of line number entries*/
    106         char            s_flags[4];     /* flags                        */
    107 };
    108 
    109 #define SCNHDR  struct external_scnhdr
    110 #define SCNHSZ  40
    111 
    112 /*
    113  * names of "special" sections
    114  */
    115 #define _TEXT   ".text"
    116 #define _DATA   ".data"
    117 #define _BSS    ".bss"
    118 #define _COMMENT ".comment"
    119 #define _LIB ".lib"
    120 
    121 /********************** LINE NUMBERS **********************/
    122 
    123 /* 1 line number entry for every "breakpointable" source line in a section.
    124  * Line numbers are grouped on a per function basis; first entry in a function
    125  * grouping will have l_lnno = 0 and in place of physical address will be the
    126  * symbol table index of the function name.
    127  */
    128 struct external_lineno {
    129         union {
    130                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    131                 char l_paddr[4];        /* (physical) address of line number    */
    132         } l_addr;
    133         char l_lnno[2]; /* line number          */
    134 };
    135 
    136 
    137 #define LINENO  struct external_lineno
    138 #define LINESZ  6
    139 
    140 
    141 /********************** SYMBOLS **********************/
    142 
    143 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    144 #define E_FILNMLEN      14      /* # characters in a file name          */
    145 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    146 
    147 struct external_syment
    148 {
    149   union {
    150     char e_name[E_SYMNMLEN];
    151     struct {
    152       char e_zeroes[4];
    153       char e_offset[4];
    154     } e;
    155   } e;
    156   char e_value[4];
    157   char e_scnum[2];
    158   char e_type[2];
    159   char e_sclass[1];
    160   char e_numaux[1];
    161 };
    162 
    163 #define N_BTMASK        (0xf)
    164 #define N_TMASK         (0x30)
    165 #define N_BTSHFT        (4)
    166 #define N_TSHIFT        (2)
    167  
    168 union external_auxent {
    169         struct {
    170                 char x_tagndx[4];       /* str, un, or enum tag indx */
    171                 union {
    172                         struct {
    173                             char  x_lnno[2]; /* declaration line number */
    174                             char  x_size[2]; /* str/union/array size */
    175                         } x_lnsz;
    176                         char x_fsize[4];        /* size of function */
    177                 } x_misc;
    178                 union {
    179                         struct {                /* if ISFCN, tag, or .bb */
    180                             char x_lnnoptr[4];  /* ptr to fcn line # */
    181                             char x_endndx[4];   /* entry ndx past block end */
    182                         } x_fcn;
    183                         struct {                /* if ISARY, up to 4 dimen. */
    184                             char x_dimen[E_DIMNUM][2];
    185                         } x_ary;
    186                 } x_fcnary;
    187                 char x_tvndx[2];                /* tv index */
    188         } x_sym;
    189 
    190         union {
    191                 char x_fname[E_FILNMLEN];
    192                 struct {
    193                         char x_zeroes[4];
    194                         char x_offset[4];
    195                 } x_n;
    196         } x_file;
    197 
    198         struct {
    199                 char x_scnlen[4];       /* section length */
    200                 char x_nreloc[2];       /* # relocation entries */
    201                 char x_nlinno[2];       /* # line numbers */
    202                 char x_checksum[4];     /* section COMDAT checksum */
    203                 char x_associated[2];   /* COMDAT associated section index */
    204                 char x_comdat[1];       /* COMDAT selection number */
    205         } x_scn;
    206 
    207         struct {
    208                 char x_tvfill[4];       /* tv fill value */
    209                 char x_tvlen[2];        /* length of .tv */
    210                 char x_tvran[2][2];     /* tv range */
    211         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    212 
    213 
    214 };
    215 
    216 #define SYMENT  struct external_syment
    217 #define SYMESZ  18     
    218 #define AUXENT  union external_auxent
    219 #define AUXESZ  18
    220 
    221 
    222 #       define _ETEXT   "etext"
    223 
    224 
    22577/********************** RELOCATION DIRECTIVES **********************/
    22678
    227 
    228 
    229 struct external_reloc {
     79struct external_reloc
     80{
    23081  char r_vaddr[4];
    23182  char r_symndx[4];
     
    23384};
    23485
    235 
    23686#define RELOC struct external_reloc
    23787#define RELSZ 10
  • branches/GNU/src/binutils/include/coff/internal.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    6262  struct internal_extra_pe_filehdr pe;
    6363
    64   /* standard coff  internal info */
     64  /* Standard coff internal info. */
    6565  unsigned short f_magic;       /* magic number                 */
    6666  unsigned short f_nscns;       /* number of sections           */
     
    7575
    7676/* Bits for f_flags:
    77  *      F_RELFLG        relocation info stripped from file
    78  *      F_EXEC          file is executable (no unresolved external references)
    79  *      F_LNNO          line numbers stripped from file
    80  *      F_LSYMS         local symbols stripped from file
    81  *      F_AR16WR        file is 16-bit little-endian
    82  *      F_AR32WR        file is 32-bit little-endian
    83  *      F_AR32W         file is 32-bit big-endian
    84  *      F_DYNLOAD       rs/6000 aix: dynamically loadable w/imports & exports
    85  *      F_SHROBJ        rs/6000 aix: file is a shared object
    86  *      F_DLL           PE format DLL
    87  */
     77        F_RELFLG        relocation info stripped from file
     78        F_EXEC          file is executable (no unresolved external references)
     79        F_LNNO          line numbers stripped from file
     80        F_LSYMS         local symbols stripped from file
     81        F_AR16WR        file is 16-bit little-endian
     82        F_AR32WR        file is 32-bit little-endian
     83        F_AR32W         file is 32-bit big-endian
     84        F_DYNLOAD       rs/6000 aix: dynamically loadable w/imports & exports
     85        F_SHROBJ        rs/6000 aix: file is a shared object
     86        F_DLL           PE format DLL.  */
    8887
    8988#define F_RELFLG        (0x0001)
     
    9897#define F_DLL           (0x2000)
    9998
    100 /* extra structure which is used in the optional header */
     99/* Extra structure which is used in the optional header. */
    101100typedef struct _IMAGE_DATA_DIRECTORY
    102101{
     
    175174
    176175  /* RS/6000 stuff */
    177   unsigned long o_toc;          /* address of TOC                       */
     176  bfd_vma o_toc;                /* address of TOC                       */
    178177  short o_snentry;              /* section number for entry point */
    179178  short o_sntext;               /* section number for text      */
     
    186185  short o_modtype;              /* Module type field, 1R,RE,RO  */
    187186  short o_cputype;              /* Encoded CPU type             */
    188   unsigned long o_maxstack;     /* max stack size allowed.      */
    189   unsigned long o_maxdata;      /* max data size allowed.       */
     187  bfd_vma o_maxstack;   /* max stack size allowed.      */
     188  bfd_vma o_maxdata;    /* max data size allowed.       */
    190189
    191190  /* ECOFF stuff */
     
    201200  long vid[2];                  /* Version id */
    202201
    203 
    204202  struct internal_extra_pe_aouthdr pe;
    205 
    206203};
    207204
     
    323320};
    324321
    325 /*
    326  * s_flags "type"
    327  */
     322/* s_flags "type".  */
    328323#define STYP_REG         (0x0000)       /* "regular": allocated, relocated, loaded */
    329324#define STYP_DSECT       (0x0001)       /* "dummy":  relocated only*/
     
    344339#define STYP_LIB         (0x0800)       /* for .lib: same as INFO */
    345340#define STYP_MERGE       (0x2000)       /* merge section -- combines with text, data or bss sections only */
    346 #define STYP_REVERSE_PAD (0x4000)       /* section will be padded with no-op instructions wherever padding is necessary and there is a
    347                                        
    348                                                                              word of contiguous bytes
    349                                                                              beginning on a word boundary. */
     341#define STYP_REVERSE_PAD (0x4000)       /* section will be padded with no-op instructions
     342                                           wherever padding is necessary and there is a
     343                                           word of contiguous bytes beginning on a word
     344                                          boundary. */
    350345
    351346#define STYP_LIT        0x8020  /* Literal data (like STYP_TEXT) */
    352347
    353348
    354 
    355349/********************** LINE NUMBERS **********************/
    356350
    357351/* 1 line number entry for every "breakpointable" source line in a section.
    358  * Line numbers are grouped on a per function basis; first entry in a function
    359  * grouping will have l_lnno = 0 and in place of physical address will be the
    360  * symbol table index of the function name.
    361  */
     352   Line numbers are grouped on a per function basis; first entry in a function
     353   grouping will have l_lnno = 0 and in place of physical address will be the
     354   symbol table index of the function name.  */
    362355
    363356struct internal_lineno
     
    365358  union
    366359  {
    367     long l_symndx;              /* function name symbol index, iff l_lnno == 0*/
    368     long l_paddr;               /* (physical) address of line number    */
     360    bfd_signed_vma l_symndx;            /* function name symbol index, iff l_lnno == 0*/
     361    bfd_signed_vma l_paddr;             /* (physical) address of line number    */
    369362  }     l_addr;
    370363  unsigned long l_lnno;         /* line number          */
     
    389382    char *_n_nptr[2];           /* allows for overlaying        */
    390383  }     _n;
    391   long n_value;                 /* value of symbol              */
     384  bfd_vma n_value;                      /* value of symbol              */
    392385  short n_scnum;                /* section number               */
    393386  unsigned short n_flags;       /* copy of flags from filhdr    */
     
    401394#define n_offset        _n._n_n._n_offset
    402395
    403 
    404396/* Relocatable symbols have number of the section in which they are defined,
    405    or one of the following: */
     397   or one of the following:  */
    406398
    407399#define N_UNDEF ((short)0)      /* undefined symbol */
     
    411403#define P_TV    ((short)-4)     /* indicates symbol needs postload transfer vector*/
    412404
    413 /*
    414  * Type of a symbol, in low N bits of the word
    415  */
     405/* Type of a symbol, in low N bits of the word.  */
     406
    416407#define T_NULL          0
    417408#define T_VOID          1       /* function argument (only used by compiler) */
     
    432423#define T_LNGDBL        16      /* long double          */
    433424
    434 /*
    435  * derived types, in n_type
    436 */
     425/* Derived types, in n_type.  */
     426
    437427#define DT_NON          (0)     /* no derived type */
    438428#define DT_PTR          (1)     /* pointer */
     
    479469      struct
    480470      {                         /* if ISFCN, tag, or .bb */
    481         long x_lnnoptr;         /* ptr to fcn line # */
     471        bfd_signed_vma x_lnnoptr;               /* ptr to fcn line # */
    482472        union
    483473        {                       /* entry ndx past block end */
     
    530520    union
    531521      {                         /* csect length or enclosing csect */
    532         long l;
     522        bfd_signed_vma l;
    533523        struct coff_ptr_struct *p;
    534524      } x_scnlen;
     
    611601
    612602#define R_DIR16          1
     603#define R_REL24          5
    613604#define R_DIR32          6
    614605#define R_IMAGEBASE      7
     
    619610#define R_PCRWORD       19
    620611#define R_PCRLONG       20
     612#define R_PCR24         21
    621613#define R_IPRSHORT      24
    622614#define R_IPRLONG       26
     
    625617#define R_TAGWORD       31
    626618#define R_JUMPTARG      32      /* strange 29k 00xx00xx reloc */
     619#define R_PARTLS16      32
     620#define R_PARTMS8       33
    627621
    628622#define R_PCR16L       128
     
    650644
    651645/* This reloc identifies a bra with an 8-bit pc-relative
    652    target that was formerlly a jmp insn with a 16bit target.  */
     646   target that was formerly a jmp insn with a 16bit target.  */
    653647#define R_JMP2          0x44
    654648
     
    662656
    663657/* This reloc identifies a bra with an 8-bit pc-relative
    664    target that was formerlly a jmp insn with a 24bit target.  */
     658   target that was formerly a jmp insn with a 24bit target.  */
    665659#define R_JMPL2         0x47
    666660
     
    690684#define R_MOVL1         0x4c
    691685
    692 /* This reloc identifies mov.[wl] insns which formerlly had
     686/* This reloc identifies mov.[wl] insns which formerly had
    693687   a 32/24bit absolute address and now have a 16bit absolute address.  */
    694688#define R_MOVL2         0x4d
  • branches/GNU/src/binutils/include/coff/m68k.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2020#define GNU_COFF_M68K_H 1
    2121
    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 
     22#define L_LNNO_SIZE 2
     23#include "coff/external.h"
    3424
    3525/* Motorola 68000/68008/68010/68020 */
     
    4232#define M68TVMAGIC      0211
    4333
    44 /* this is the magic of the Bull dpx/2 */
     34/* This is the magic of the Bull dpx/2 */
    4535#define MC68KBCSMAGIC   0526
    4636
     
    5343/* This intentionally does not include MC68KBCSMAGIC; it only includes
    5444   magic numbers which imply that names do not have underscores.  */
    55 #define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \
    56   ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && ((x).f_magic!=LYNXCOFFMAGIC) )
     45#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
     46                    && ((x).f_magic != MC68KWRMAGIC) \
     47                    && ((x).f_magic != MC68TVMAGIC) \
     48                    && ((x).f_magic != MC68KROMAGIC) \
     49                    && ((x).f_magic != MC68KPGMAGIC) \
     50                    && ((x).f_magic != M68MAGIC) \
     51                    && ((x).f_magic != M68TVMAGIC) \
     52                    && ((x).f_magic != LYNXCOFFMAGIC))
    5753
    5854/* Magic numbers for the a.out header.  */
     
    6359#define PAGEMAGICPEXECPAGED   0413 /* pure executable (paged) */
    6460
    65 #define FILHDR  struct external_filehdr
    66 #define FILHSZ  20
    67 
    68 
    69 /********************** AOUT "OPTIONAL HEADER" **********************/
    70 
    71 
    72 typedef struct
    73 {
    74   char  magic[2];               /* type of file                         */
    75   char  vstamp[2];              /* version stamp                        */
    76   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    77   char  dsize[4];               /* initialized data "  "                */
    78   char  bsize[4];               /* uninitialized data "   "             */
    79   char  entry[4];               /* entry pt.                            */
    80   char  text_start[4];          /* base of text used for this file */
    81   char  data_start[4];          /* base of data used for this file */
    82 }
    83 AOUTHDR;
    84 
    85 #define AOUTSZ 28
    86 #define AOUTHDRSZ 28
    87 
    88 
    89 /********************** SECTION HEADER **********************/
    90 
    91 
    92 struct external_scnhdr {
    93         char            s_name[8];      /* section name                 */
    94         char            s_paddr[4];     /* physical address, aliased s_nlib */
    95         char            s_vaddr[4];     /* virtual address              */
    96         char            s_size[4];      /* section size                 */
    97         char            s_scnptr[4];    /* file ptr to raw data for section */
    98         char            s_relptr[4];    /* file ptr to relocation       */
    99         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    100         char            s_nreloc[2];    /* number of relocation entries */
    101         char            s_nlnno[2];     /* number of line number entries*/
    102         char            s_flags[4];     /* flags                        */
    103 };
    104 
    105 /*
    106  * names of "special" sections
    107  */
    108 #define _TEXT   ".text"
    109 #define _DATA   ".data"
    110 #define _BSS    ".bss"
    111 #define _COMMENT ".comment"
    112 
    113 #define SCNHDR  struct external_scnhdr
    114 #define SCNHSZ  40
    115 
    116 
    117 /********************** LINE NUMBERS **********************/
    118 
    119 /* 1 line number entry for every "breakpointable" source line in a section.
    120  * Line numbers are grouped on a per function basis; first entry in a function
    121  * grouping will have l_lnno = 0 and in place of physical address will be the
    122  * symbol table index of the function name.
    123  */
    124 struct external_lineno {
    125         union {
    126                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    127                 char l_paddr[4];        /* (physical) address of line number    */
    128         } l_addr;
    129         char l_lnno[2]; /* line number          */
    130 };
    131 
    132 
    133 #define LINENO  struct external_lineno
    134 #define LINESZ  6
    135 
    136 
    137 /********************** SYMBOLS **********************/
    138 
    139 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    140 #define E_FILNMLEN      14      /* # characters in a file name          */
    141 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    142 
    143 struct external_syment
    144 {
    145   union {
    146     char e_name[E_SYMNMLEN];
    147     struct {
    148       char e_zeroes[4];
    149       char e_offset[4];
    150     } e;
    151   } e;
    152   char e_value[4];
    153   char e_scnum[2];
    154   char e_type[2];
    155   char e_sclass[1];
    156   char e_numaux[1];
    157 };
    158 
    159 
    160 
    161 #define N_BTMASK        (017)
    162 #define N_TMASK         (060)
    163 #define N_BTSHFT        (4)
    164 #define N_TSHIFT        (2)
    165  
    166 
    167 union external_auxent {
    168         struct {
    169                 char x_tagndx[4];       /* str, un, or enum tag indx */
    170                 union {
    171                         struct {
    172                             char  x_lnno[2]; /* declaration line number */
    173                             char  x_size[2]; /* str/union/array size */
    174                         } x_lnsz;
    175                         char x_fsize[4];        /* size of function */
    176                 } x_misc;
    177                 union {
    178                         struct {                /* if ISFCN, tag, or .bb */
    179                             char x_lnnoptr[4];  /* ptr to fcn line # */
    180                             char x_endndx[4];   /* entry ndx past block end */
    181                         } x_fcn;
    182                         struct {                /* if ISARY, up to 4 dimen. */
    183                             char x_dimen[E_DIMNUM][2];
    184                         } x_ary;
    185                 } x_fcnary;
    186                 char x_tvndx[2];                /* tv index */
    187         } x_sym;
    188 
    189         union {
    190                 char x_fname[E_FILNMLEN];
    191                 struct {
    192                         char x_zeroes[4];
    193                         char x_offset[4];
    194                 } x_n;
    195         } x_file;
    196 
    197         struct {
    198                 char x_scnlen[4];                       /* section length */
    199                 char x_nreloc[2];       /* # relocation entries */
    200                 char x_nlinno[2];       /* # line numbers */
    201         } x_scn;
    202 
    203         struct {
    204                 char x_tvfill[4];       /* tv fill value */
    205                 char x_tvlen[2];        /* length of .tv */
    206                 char x_tvran[2][2];     /* tv range */
    207         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    208 
    209 
    210 };
    211 
    212 #define SYMENT  struct external_syment
    213 #define SYMESZ  18     
    214 #define AUXENT  union external_auxent
    215 #define AUXESZ  18
    216 
    217 
    218 
    21961/********************** RELOCATION DIRECTIVES **********************/
    22062
    221 
    222 struct external_reloc {
     63struct external_reloc
     64{
    22365  char r_vaddr[4];
    22466  char r_symndx[4];
     
    22769  char r_offset[4];
    22870#endif
    229 
    23071};
    231 
    23272
    23373#define RELOC struct external_reloc
  • branches/GNU/src/binutils/include/coff/m88k.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 struct external_filehdr {
    21         char f_magic[2];        /* magic number                 */
    22         char f_nscns[2];        /* number of sections           */
    23         char f_timdat[4];       /* time & date stamp            */
    24         char f_symptr[4];       /* file pointer to symtab       */
    25         char f_nsyms[4];        /* number of symtab entries     */
    26         char f_opthdr[2];       /* sizeof(optional hdr)         */
    27         char f_flags[2];        /* flags                        */
    28 };
     19#define DO_NOT_DEFINE_SCNHDR
     20#define L_LNNO_SIZE 4
     21#define DO_NOT_DEFINE_SYMENT
     22#define DO_NOT_DEFINE_AUXENT
     23#include "coff/external.h"
    2924
    3025#define MC88MAGIC  0540           /* 88k BCS executable */
     
    3227#define MC88OMAGIC 0555           /* Object file        */
    3328
    34 #define MC88BADMAG(x) (((x).f_magic!=MC88MAGIC) &&((x).f_magic!=MC88DMAGIC) && ((x).f_magic != MC88OMAGIC))
     29#define MC88BADMAG(x) (((x).f_magic != MC88MAGIC) \
     30                    && ((x).f_magic != MC88DMAGIC) \
     31                    && ((x).f_magic != MC88OMAGIC))
    3532
    36 #define FILHDR  struct external_filehdr
    37 #define FILHSZ  20
    38 
    39 
    40 /********************** AOUT "OPTIONAL HEADER" **********************/
    41 
    42 
    43 #define PAGEMAGIC3 0414 /* Split i&d, zero mapped */
     33#define PAGEMAGIC3   0414 /* Split i&d, zero mapped */
    4434#define PAGEMAGICBCS 0413
    4535
    46 
    47 typedef struct
    48 {
    49   char  magic[2];               /* type of file                         */
    50   char  vstamp[2];              /* version stamp                        */
    51   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    52   char  dsize[4];               /* initialized data "  "                */
    53   char  bsize[4];               /* uninitialized data "   "             */
    54   char  entry[4];               /* entry pt.                            */
    55   char  text_start[4];          /* base of text used for this file */
    56   char  data_start[4];          /* base of data used for this file */
    57 }
    58 AOUTHDR;
    59 
    60 
    61 /* compute size of a header */
    62 
    63 #define AOUTSZ 28
    64 #define AOUTHDRSZ 28
    65 
    66 
    6736/********************** SECTION HEADER **********************/
    68 
    6937
    7038struct external_scnhdr
     
    8250};
    8351
    84 
    8552#define SCNHDR  struct external_scnhdr
    8653#define SCNHSZ  44
    8754
    88 /*
    89  * names of "special" sections
    90  */
     55/* Names of "special" sections.  */
    9156#define _TEXT   ".text"
    9257#define _DATA   ".data"
    9358#define _BSS    ".bss"
    9459#define _COMMENT ".comment"
    95 
    96 /********************** LINE NUMBERS **********************/
    97 
    98 /* 1 line number entry for every "breakpointable" source line in a section.
    99  * Line numbers are grouped on a per function basis; first entry in a function
    100  * grouping will have l_lnno = 0 and in place of physical address will be the
    101  * symbol table index of the function name.
    102  */
    103 struct external_lineno{
    104         union {
    105                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    106                 char l_paddr[4];        /* (physical) address of line number    */
    107         } l_addr;
    108 
    109         char l_lnno[4];
    110 
    111 };
    112 
    113 #define LINENO  struct external_lineno
    114 #define LINESZ  8
    11560
    11661
     
    12368struct external_syment
    12469{
    125   union {
     70  union
     71  {
    12672    char e_name[E_SYMNMLEN];
    127     struct {
     73
     74    struct
     75    {
    12876      char e_zeroes[4];
    12977      char e_offset[4];
    13078    } e;
     79
    13180  } e;
     81
    13282  char e_value[4];
    13383  char e_scnum[2];
     
    13888};
    13989
    140 
    141 
    142 
    14390#define N_BTMASK        017
    14491#define N_TMASK         060
     
    14693#define N_TSHIFT        2
    14794
    148 
    14995/* Note that this isn't the same shape as other coffs */
    150 union external_auxent {
    151   struct {
     96union external_auxent
     97{
     98  struct
     99  {
    152100    char x_tagndx[4];           /* str, un, or enum tag indx */
    153101    /* 4 */
    154     union {
     102   
     103    union
     104    {
    155105      char x_fsize[4];          /* size of function */
    156       struct {
     106
     107      struct
     108      {
    157109        char  x_lnno[4];        /* declaration line number */
    158110        char  x_size[4];        /* str/union/array size */
    159111      } x_lnsz;
     112
    160113    } x_misc;
    161114   
    162115    /* 12 */
    163     union {
    164       struct {                  /* if ISFCN, tag, or .bb */
     116    union
     117    {
     118      struct                    /* if ISFCN, tag, or .bb */
     119      {
    165120        char x_lnnoptr[4];      /* ptr to fcn line # */
    166121        char x_endndx[4];               /* entry ndx past block end */
    167122      } x_fcn;
    168       struct {                  /* if ISARY, up to 4 dimen. */
     123
     124      struct                    /* if ISARY, up to 4 dimen. */
     125      {
    169126        char x_dimen[E_DIMNUM][2];
    170127      } x_ary;
     128
    171129    } x_fcnary;
    172130    /* 20 */
     
    174132  } x_sym;
    175133 
    176   union {
     134  union
     135  {
    177136    char x_fname[E_FILNMLEN];
    178     struct {
     137
     138    struct
     139    {
    179140      char x_zeroes[4];
    180141      char x_offset[4];
    181142    } x_n;
     143
    182144  } x_file;
    183145 
    184   struct {
     146  struct
     147  {
    185148    char x_scnlen[4];           /* section length */
    186149    char x_nreloc[4];           /* # relocation entries */
     
    188151  } x_scn;
    189152 
    190   struct {
     153  struct
     154  {
    191155    char x_tvfill[4];           /* tv fill value */
    192156    char x_tvlen[2];            /* length of .tv */
    193157    char x_tvran[2][2];         /* tv range */
    194158  } x_tv;                       /* info about .tv section (in auxent of symbol .tv)) */
    195 
    196159};
    197160
    198 #define GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *)ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
    199 #define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
    200 #define PUT_FCN_LNNOPTR(abfd, in, ext)  bfd_h_put_32(abfd,  in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
    201 #define PUT_FCN_ENDNDX(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)   ext->x_sym.x_fcnary.x_fcn.x_endndx)
    202 #define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
    203 #define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
    204 #define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
    205 #define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
    206 #define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen)
    207 #define GET_SCN_NRELOC(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nreloc)
    208 #define GET_SCN_NLINNO(abfd, ext)  bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_nlinno)
    209 #define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen)
    210 #define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc)
    211 #define PUT_SCN_NLINNO(abfd,in, ext)  bfd_h_put_32(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno)
    212 #define GET_LINENO_LNNO(abfd, ext)  bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno))
    213 #define PUT_LINENO_LNNO(abfd,val, ext)  bfd_h_put_32(abfd,val,  (bfd_byte *) (ext->l_lnno));
    214 
    215 
     161#define GET_LNSZ_SIZE(abfd, ext) \
     162  H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
     163#define GET_LNSZ_LNNO(abfd, ext) \
     164  H_GET_32 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
     165#define PUT_LNSZ_LNNO(abfd, in, ext) \
     166  H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
     167#define PUT_LNSZ_SIZE(abfd, in, ext) \
     168  H_PUT_32 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
     169#define GET_SCN_NRELOC(abfd, ext) \
     170  H_GET_32 (abfd, ext->x_scn.x_nreloc)
     171#define GET_SCN_NLINNO(abfd, ext) \
     172  H_GET_32 (abfd, ext->x_scn.x_nlinno)
     173#define PUT_SCN_NRELOC(abfd, in, ext) \
     174  H_PUT_32 (abfd, in, ext->x_scn.x_nreloc)
     175#define PUT_SCN_NLINNO(abfd, in, ext) \
     176  H_PUT_32 (abfd,in, ext->x_scn.x_nlinno)
    216177
    217178#define SYMENT  struct external_syment
     
    220181#define AUXESZ  20
    221182
    222 
    223183/********************** RELOCATION DIRECTIVES **********************/
    224184
    225 struct external_reloc {
     185struct external_reloc
     186{
    226187  char r_vaddr[4];
    227188  char r_symndx[4];
  • branches/GNU/src/binutils/include/coff/mcore.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323#define _COFF_MORE_H
    2424
     25#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     26#define L_LNNO_SIZE 2
     27#include "coff/external.h"
     28
     29#define MCOREMAGIC      0xb00  /* I just made this up */
     30
     31#define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
    2532
    2633#define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
     
    3744#define PEMCORE
    3845
    39 typedef struct
    40 {
    41   char  magic      [2];         /* type of file                         */
    42   char  vstamp     [2];         /* version stamp                        */
    43   char  tsize      [4];         /* text size in bytes, padded to FW bdry*/
    44   char  dsize      [4];         /* initialized data "  "                */
    45   char  bsize      [4];         /* uninitialized data "   "             */
    46   char  entry      [4];         /* entry pt.                            */
    47   char  text_start [4];         /* base of text used for this file */
    48   char  data_start [4];         /* base of data used for this file */
    49 }
    50 AOUTHDR;
    51 
    52 #define AOUTSZ 28
    53 #define AOUTHDRSZ 28
    54 
    5546#define OMAGIC          0404    /* object files, eg as output */
    5647#define ZMAGIC          0413    /* demand load format, eg normal ld output */
     
    6152#define IMAGE_NT_OPTIONAL_HDR_MAGIC        0x10b
    6253
    63 
    6454/* Define some NT default values. */
    6555#define NT_SECTION_ALIGNMENT 0x1000
     
    6757#define NT_DEF_RESERVE       0x100000
    6858#define NT_DEF_COMMIT        0x1000
    69 
    7059
    7160struct external_reloc
     
    8069#define RELSZ 14
    8170
    82 #define MCOREMAGIC      0xb00  /* I just made this up */
    83 
    84 #define MCOREBADMAG(x) (((x).f_magic!= MCOREMAGIC))
    85 
    86 struct external_filehdr
    87 {
    88   char f_magic  [2];    /* magic number                 */
    89   char f_nscns  [2];    /* number of sections           */
    90   char f_timdat [4];    /* time & date stamp            */
    91   char f_symptr [4];    /* file pointer to symtab       */
    92   char f_nsyms  [4];    /* number of symtab entries     */
    93   char f_opthdr [2];    /* sizeof(optional hdr)         */
    94   char f_flags  [2];    /* flags                        */
    95 };
    96 
    97 #define FILHDR  struct external_filehdr
    98 #define FILHSZ  20
    99 
    100 
    101 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    102 #define E_FILNMLEN      14      /* # characters in a file name          */
    103 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    104 
    105 struct external_syment
    106 {
    107   union
    108   {
    109     char e_name [E_SYMNMLEN];
    110     struct
    111     {
    112       char e_zeroes [4];
    113       char e_offset [4];
    114     } e;
    115   } e;
    116  
    117   char e_value  [4];
    118   char e_scnum  [2];
    119   char e_type   [2];
    120   char e_sclass [1];
    121   char e_numaux [1];
    122 };
    123 
    124 #define N_BTMASK        0xf
    125 #define N_TMASK         0x30
    126 #define N_BTSHFT        4
    127 #define N_TSHIFT        2
    128 
    129 union external_auxent
    130 {
    131   struct
    132   {
    133     char x_tagndx [4];          /* str, un, or enum tag indx */
    134    
    135     union
    136     {
    137       struct
    138       {
    139         char  x_lnno [2];       /* declaration line number */
    140         char  x_size [2];       /* str/union/array size */
    141       } x_lnsz;
    142 
    143       char x_fsize [4];         /* size of function */
    144 
    145     } x_misc;
    146 
    147     union
    148     {
    149       struct                    /* if ISFCN, tag, or .bb */
    150       {
    151         char x_lnnoptr [4];     /* ptr to fcn line # */
    152         char x_endndx  [4];     /* entry ndx past block end */
    153       } x_fcn;
    154 
    155       struct                    /* if ISARY, up to 4 dimen. */
    156       {
    157         char x_dimen [E_DIMNUM][2];
    158       } x_ary;
    159      
    160     } x_fcnary;
    161 
    162     char x_tvndx [2];           /* tv index */
    163 
    164   } x_sym;
    165 
    166   union
    167   {
    168     char x_fname [E_FILNMLEN];
    169    
    170     struct
    171     {
    172       char x_zeroes [4];
    173       char x_offset [4];
    174     } x_n;
    175    
    176   } x_file;
    177 
    178   struct
    179   {
    180     char x_scnlen     [4];      /* section length */
    181     char x_nreloc     [2];      /* # relocation entries */
    182     char x_nlinno     [2];      /* # line numbers */
    183     char x_checksum   [4];      /* section COMDAT checksum */
    184     char x_associated [2];      /* COMDAT associated section index */
    185     char x_comdat     [1];      /* COMDAT selection number */
    186   } x_scn;
    187 
    188   struct
    189   {
    190     char x_tvfill [4];          /* tv fill value */
    191     char x_tvlen  [2];          /* length of .tv */
    192     char x_tvran  [2][2];       /* tv range */
    193   } x_tv;                       /* info about .tv section (in auxent of symbol .tv)) */
    194 };
    195 
    196 #define SYMENT  struct external_syment
    197 #define SYMESZ  18     
    198 #define AUXENT  union external_auxent
    199 #define AUXESZ  18
    200 
    201 /* 1 line number entry for every "breakpointable" source line in a section.
    202    Line numbers are grouped on a per function basis; first entry in a function
    203    grouping will have l_lnno = 0 and in place of physical address will be the
    204    symbol table index of the function name.  */
    205 struct external_lineno
    206 {
    207   union
    208   {
    209     char l_symndx [4];  /* function name symbol index, iff l_lnno == 0*/
    210     char l_paddr  [4];  /* (physical) address of line number    */
    211   } l_addr;
    212 
    213   char l_lnno [2];      /* line number          */
    214 };
    215 
    216 #define LINENO  struct external_lineno
    217 #define LINESZ  6
    218 
    219 #define GET_LINENO_LNNO(abfd, ext)     bfd_h_get_32 (abfd, (bfd_byte *) (ext->l_lnno));
    220 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32 (abfd, val, (bfd_byte *) (ext->l_lnno));
    221 
    222 struct external_scnhdr
    223 {
    224   char  s_name    [8];  /* section name                 */
    225   char  s_paddr   [4];  /* physical address, aliased s_nlib */
    226   char  s_vaddr   [4];  /* virtual address              */
    227   char  s_size    [4];  /* section size                 */
    228   char  s_scnptr  [4];  /* file ptr to raw data for section */
    229   char  s_relptr  [4];  /* file ptr to relocation       */
    230   char  s_lnnoptr [4];  /* file ptr to line numbers     */
    231   char  s_nreloc  [2];  /* number of relocation entries */
    232   char  s_nlnno   [2];  /* number of line number entries*/
    233   char  s_flags   [4];  /* flags                        */
    234 };
    235 
    236 #define SCNHDR  struct external_scnhdr
    237 #define SCNHSZ  40
    238 
    239 /* Names of "special" sections.  */
    240 #define _TEXT   ".text"
    241 #define _DATA   ".data"
    242 #define _BSS    ".bss"
    243 
    244 
    245 
    24671#endif /* __COFF_MCORE_H */
  • branches/GNU/src/binutils/include/coff/mips.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1818   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1919
    20 /********************** FILE HEADER **********************/
    21 
    22 struct external_filehdr {
    23   unsigned char f_magic[2];     /* magic number                 */
    24   unsigned char f_nscns[2];     /* number of sections           */
    25   unsigned char f_timdat[4];    /* time & date stamp            */
    26   unsigned char f_symptr[4];    /* file pointer to symtab       */
    27   unsigned char f_nsyms[4];     /* number of symtab entries     */
    28   unsigned char f_opthdr[2];    /* sizeof(optional hdr)         */
    29   unsigned char f_flags[2];     /* flags                        */
    30 };
     20#define DO_NOT_DEFINE_AOUTHDR
     21#define L_LNNO_SIZE 4
     22#include "coff/external.h"
    3123
    3224/* Magic numbers are defined in coff/ecoff.h.  */
     
    3931                              ((x).f_magic!=MIPS_MAGIC_BIG3))
    4032
    41 #define FILHDR  struct external_filehdr
    42 #define FILHSZ  20
    4333
    4434/********************** AOUT "OPTIONAL HEADER" **********************/
    45 
    4635
    4736typedef struct external_aouthdr
     
    6655#define AOUTHDRSZ 56
    6756
    68 /********************** SECTION HEADER **********************/
    69 
    70 struct external_scnhdr {
    71   unsigned char s_name[8];      /* section name                 */
    72   unsigned char s_paddr[4];     /* physical address, aliased s_nlib */
    73   unsigned char s_vaddr[4];     /* virtual address              */
    74   unsigned char s_size[4];      /* section size                 */
    75   unsigned char s_scnptr[4];    /* file ptr to raw data for section */
    76   unsigned char s_relptr[4];    /* file ptr to relocation       */
    77   unsigned char s_lnnoptr[4];   /* file ptr to line numbers     */
    78   unsigned char s_nreloc[2];    /* number of relocation entries */
    79   unsigned char s_nlnno[2];     /* number of line number entries*/
    80   unsigned char s_flags[4];     /* flags                        */
    81 };
    82 
    83 #define SCNHDR  struct external_scnhdr
    84 #define SCNHSZ  40
    85 
    8657/********************** RELOCATION DIRECTIVES **********************/
    8758
    88 struct external_reloc {
    89   unsigned char r_vaddr[4];
    90   unsigned char r_bits[4];
    91 };
     59struct external_reloc
     60  {
     61    unsigned char r_vaddr[4];
     62    unsigned char r_bits[4];
     63  };
    9264
    9365#define RELOC struct external_reloc
     
    179151/* File header as a set of bytes */
    180152
    181 struct hdr_ext {
     153struct hdr_ext
     154{
    182155        unsigned char   h_magic[2];
    183156        unsigned char   h_vstamp[2];
     
    209182/* File descriptor external record */
    210183
    211 struct fdr_ext {
     184struct fdr_ext
     185{
    212186        unsigned char   f_adr[4];
    213187        unsigned char   f_rss[4];
     
    255229/* Procedure descriptor external record */
    256230
    257 struct pdr_ext {
     231struct pdr_ext
     232{
    258233        unsigned char   p_adr[4];
    259234        unsigned char   p_isym[4];
     
    274249/* Runtime procedure table */
    275250
    276 struct rpdr_ext {
     251struct rpdr_ext
     252{
    277253        unsigned char   p_adr[4];
    278254        unsigned char   p_regmask[4];
     
    290266/* Line numbers */
    291267
    292 struct line_ext {
     268struct line_ext
     269{
    293270        unsigned char   l_line[4];
    294271};
     
    296273/* Symbol external record */
    297274
    298 struct sym_ext {
     275struct sym_ext
     276{
    299277        unsigned char   s_iss[4];
    300278        unsigned char   s_value[4];
     
    336314/* External symbol external record */
    337315
    338 struct ext_ext {
     316struct ext_ext
     317{
    339318        unsigned char   es_bits1[1];
    340319        unsigned char   es_bits2[1];
     
    354333/* Dense numbers external record */
    355334
    356 struct dnr_ext {
     335struct dnr_ext
     336{
    357337        unsigned char   d_rfd[4];
    358338        unsigned char   d_index[4];
     
    361341/* Relative file descriptor */
    362342
    363 struct rfd_ext {
     343struct rfd_ext
     344{
    364345  unsigned char rfd[4];
    365346};
     
    367348/* Optimizer symbol external record */
    368349
    369 struct opt_ext {
     350struct opt_ext
     351{
    370352  unsigned char o_bits1[1];
    371353  unsigned char o_bits2[1];
  • branches/GNU/src/binutils/include/coff/mipspe.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
    31 
     19#define L_LNNO_SIZE 2
     20#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     21#include "coff/external.h"
    3222
    3323#define MIPS_ARCH_MAGIC_WINCE   0x0166  /* Windows CE - little endian */
    3424#define MIPS_PE_MAGIC           0x010b
    3525
    36 #define MIPSBADMAG(x) \
    37  ((x).f_magic!=MIPS_ARCH_MAGIC_WINCE)
    38 
    39 #define FILHDR  struct external_filehdr
    40 #define FILHSZ  20
    41 
    42 
    43 /********************** AOUT "OPTIONAL HEADER" **********************/
    44 
    45 
    46 typedef struct
    47 {
    48   char  magic[2];               /* type of file                         */
    49   char  vstamp[2];              /* version stamp                        */
    50   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    51   char  dsize[4];               /* initialized data "  "                */
    52   char  bsize[4];               /* uninitialized data "   "             */
    53   char  entry[4];               /* entry pt.                            */
    54   char  text_start[4];          /* base of text used for this file */
    55   char  data_start[4];          /* base of data used for this file */
    56 }
    57 AOUTHDR;
    58 
    59 
    60 #define AOUTHDRSZ 28
    61 #define AOUTSZ 28
    62 
    63 
    64 
     26#define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE)
    6527
    6628/* define some NT default values */
     
    7133#define NT_DEF_COMMIT        0x1000
    7234
    73 /********************** SECTION HEADER **********************/
    74 
    75 
    76 struct external_scnhdr {
    77         char            s_name[8];      /* section name                 */
    78         char            s_paddr[4];     /* physical address, aliased s_nlib */
    79         char            s_vaddr[4];     /* virtual address              */
    80         char            s_size[4];      /* section size                 */
    81         char            s_scnptr[4];    /* file ptr to raw data for section */
    82         char            s_relptr[4];    /* file ptr to relocation       */
    83         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    84         char            s_nreloc[2];    /* number of relocation entries */
    85         char            s_nlnno[2];     /* number of line number entries*/
    86         char            s_flags[4];     /* flags                        */
    87 };
    88 
    89 /*
    90  * names of "special" sections
    91  */
    92 #define _TEXT   ".text"
    93 #define _DATA   ".data"
    94 #define _BSS    ".bss"
    95 
    96 
    97 #define SCNHDR  struct external_scnhdr
    98 #define SCNHSZ  40
    99 
    100 
    101 /********************** LINE NUMBERS **********************/
    102 
    103 /* 1 line number entry for every "breakpointable" source line in a section.
    104  * Line numbers are grouped on a per function basis; first entry in a function
    105  * grouping will have l_lnno = 0 and in place of physical address will be the
    106  * symbol table index of the function name.
    107  */
    108 struct external_lineno {
    109         union {
    110                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    111                 char l_paddr[4];        /* (physical) address of line number    */
    112         } l_addr;
    113         char l_lnno[2]; /* line number          */
    114 };
    115 
    116 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
    117 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val,  (bfd_byte *) (ext->l_lnno));
    118 
    119 #define LINENO  struct external_lineno
    120 #define LINESZ  6
    121 
    122 
    123 /********************** SYMBOLS **********************/
    124 
    125 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    126 #define E_FILNMLEN      14      /* # characters in a file name          */
    127 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    128 
    129 struct external_syment
    130 {
    131   union {
    132     char e_name[E_SYMNMLEN];
    133     struct {
    134       char e_zeroes[4];
    135       char e_offset[4];
    136     } e;
    137   } e;
    138   char e_value[4];
    139   char e_scnum[2];
    140   char e_type[2];
    141   char e_sclass[1];
    142   char e_numaux[1];
    143 };
    144 
    145 
    146 
    147 #define N_BTMASK        (017)
    148 #define N_TMASK         (060)
    149 #define N_BTSHFT        (4)
    150 #define N_TSHIFT        (2)
    151  
    152 
    153 union external_auxent {
    154         struct {
    155                 char x_tagndx[4];       /* str, un, or enum tag indx */
    156                 union {
    157                         struct {
    158                             char  x_lnno[2]; /* declaration line number */
    159                             char  x_size[2]; /* str/union/array size */
    160                         } x_lnsz;
    161                         char x_fsize[4];        /* size of function */
    162                 } x_misc;
    163                 union {
    164                         struct {                /* if ISFCN, tag, or .bb */
    165                             char x_lnnoptr[4];  /* ptr to fcn line # */
    166                             char x_endndx[4];   /* entry ndx past block end */
    167                         } x_fcn;
    168                         struct {                /* if ISARY, up to 4 dimen. */
    169                             char x_dimen[E_DIMNUM][2];
    170                         } x_ary;
    171                 } x_fcnary;
    172                 char x_tvndx[2];                /* tv index */
    173         } x_sym;
    174 
    175         union {
    176                 char x_fname[E_FILNMLEN];
    177                 struct {
    178                         char x_zeroes[4];
    179                         char x_offset[4];
    180                 } x_n;
    181         } x_file;
    182 
    183         struct {
    184                 char x_scnlen[4];                       /* section length */
    185                 char x_nreloc[2];       /* # relocation entries */
    186                 char x_nlinno[2];       /* # line numbers */
    187                 char x_checksum[4];     /* section COMDAT checksum */
    188                 char x_associated[2];   /* COMDAT associated section index */
    189                 char x_comdat[1];       /* COMDAT selection number */
    190         } x_scn;
    191 
    192         struct {
    193                 char x_tvfill[4];       /* tv fill value */
    194                 char x_tvlen[2];        /* length of .tv */
    195                 char x_tvran[2][2];     /* tv range */
    196         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    197 
    198 
    199 };
    200 
    201 #define SYMENT  struct external_syment
    202 #define SYMESZ  18     
    203 #define AUXENT  union external_auxent
    204 #define AUXESZ  18
    205 
    206 
    207 
    20835/********************** RELOCATION DIRECTIVES **********************/
    20936
    21037/* The external reloc has an offset field, because some of the reloc
    21138   types on the h8 don't have room in the instruction for the entire
    212    offset - eg the strange jump and high page addressing modes */
     39   offset - eg the strange jump and high page addressing modes. */
    21340
    214 struct external_reloc {
     41struct external_reloc
     42{
    21543  char r_vaddr[4];
    21644  char r_symndx[4];
    21745  char r_type[2];
    21846};
    219 
    22047
    22148#define RELOC struct external_reloc
  • 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 (krk@cygnus.com)  */
    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];
  • branches/GNU/src/binutils/include/coff/rs6000.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    6767#define AOUTHDRSZ 72
    6868
    69 #define RS6K_AOUTHDR_OMAGIC     0x0107  /* old: text & data writeable */
    70 #define RS6K_AOUTHDR_NMAGIC     0x0108  /* new: text r/o, data r/w */
    71 #define RS6K_AOUTHDR_ZMAGIC     0x010B  /* paged: text r/o, both page-aligned */
    72 
    73 
    7469/********************** SECTION HEADER **********************/
    7570
     
    8883};
    8984
    90 /*
    91  * names of "special" sections
    92  */
    93 #define _TEXT   ".text"
    94 #define _DATA   ".data"
    95 #define _BSS    ".bss"
    96 #define _PAD    ".pad"
    97 #define _LOADER ".loader"
    98 
    9985#define SCNHDR  struct external_scnhdr
    10086#define SCNHSZ  40
    101 
    102 /* XCOFF uses a special .loader section with type STYP_LOADER.  */
    103 #define STYP_LOADER 0x1000
    104 
    105 /* XCOFF uses a special .debug section with type STYP_DEBUG.  */
    106 #define STYP_DEBUG 0x2000
    107 
    108 /* XCOFF handles line number or relocation overflow by creating
    109    another section header with STYP_OVRFLO set.  */
    110 #define STYP_OVRFLO 0x8000
    11187
    11288/********************** LINE NUMBERS **********************/
     
    242218/* For new sections we havn't heard of before */
    243219#define DEFAULT_SECTION_ALIGNMENT 4
     220
     221/* The ldhdr structure.  This appears at the start of the .loader
     222   section.  */
     223
     224struct external_ldhdr
     225{
     226  bfd_byte l_version[4];
     227  bfd_byte l_nsyms[4];
     228  bfd_byte l_nreloc[4];
     229  bfd_byte l_istlen[4];
     230  bfd_byte l_nimpid[4];
     231  bfd_byte l_impoff[4];
     232  bfd_byte l_stlen[4];
     233  bfd_byte l_stoff[4];
     234};
     235
     236#define LDHDRSZ (8 * 4)
     237
     238struct external_ldsym
     239{
     240  union
     241    {
     242      bfd_byte _l_name[SYMNMLEN];
     243      struct
     244        {
     245          bfd_byte _l_zeroes[4];
     246          bfd_byte _l_offset[4];
     247        } _l_l;
     248    } _l;
     249  bfd_byte l_value[4];
     250  bfd_byte l_scnum[2];
     251  bfd_byte l_smtype[1];
     252  bfd_byte l_smclas[1];
     253  bfd_byte l_ifile[4];
     254  bfd_byte l_parm[4];
     255};
     256
     257#define LDSYMSZ (8 + 3 * 4 + 2 + 2)
     258
     259struct external_ldrel
     260{
     261  bfd_byte l_vaddr[4];
     262  bfd_byte l_symndx[4];
     263  bfd_byte l_rtype[2];
     264  bfd_byte l_rsecnm[2];
     265};
     266
     267#define LDRELSZ (2 * 4 + 2 * 2)
  • branches/GNU/src/binutils/include/coff/rs6k64.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* IBM RS/6000 "XCOFF64" file definitions for BFD.
    2    Copyright (C) 2000 Free Software Foundation, Inc. 
     2   Copyright (C) 2000, 2002 Free Software Foundation, Inc. 
    33
    44   This program is free software; you can redistribute it and/or modify
     
    1414   You should have received a copy of the GNU General Public License
    1515   along with this program; if not, write to the Free Software
    16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
    17 */
     16   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1817
    1918/********************** FILE HEADER **********************/
    2019
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[8];/* file pointer to symtab      */
    26         char f_opthdr[2];       /* sizeof(optional hdr)         */
    27         char f_flags[2];        /* flags                        */
    28         char f_nsyms[4];        /* number of symtab entries     */
    29 };
    30 
    31         /* IBM RS/6000 */
    32 #define U803XTOCMAGIC 0757      /* readonly text segments and TOC, XCOFF64 */
    33 
    34 #define BADMAG(x) ((x).f_magic != U803XTOCMAGIC)
     20struct external_filehdr
     21{
     22  char f_magic[2];      /* magic number                 */
     23  char f_nscns[2];      /* number of sections           */
     24  char f_timdat[4];     /* time & date stamp            */
     25  char f_symptr[8];     /* file pointer to symtab       */
     26  char f_opthdr[2];     /* sizeof(optional hdr)         */
     27  char f_flags[2];      /* flags                        */
     28  char f_nsyms[4];      /* number of symtab entries     */
     29};
     30
     31/* IBM RS/6000.  */
     32#define U803XTOCMAGIC 0757      /* Aix 4.3 64-bit XCOFF */
     33#define U64_TOCMAGIC  0767      /* AIX 5+ 64-bit XCOFF */
     34#define BADMAG(x) ((x).f_magic != U803XTOCMAGIC && (x).f_magic != U64_TOCMAGIC)
    3535
    3636#define FILHDR  struct external_filehdr
     
    3838
    3939/********************** AOUT "OPTIONAL HEADER" **********************/
    40 
    4140
    4241typedef struct
     
    4544  unsigned char vstamp[2];              /* version stamp                */
    4645  unsigned char o_debugger[4];          /* reserved                     */
    47   unsigned char text_start[8];  /* base of text used for this file */
    48   unsigned char data_start[8];  /* base of data used for this file */
    49   unsigned char o_toc[8];       /* address of TOC */
     46  unsigned char text_start[8];          /* base of text used for this file */
     47  unsigned char data_start[8];          /* base of data used for this file */
     48  unsigned char o_toc[8];               /* address of TOC */
    5049  unsigned char o_snentry[2];           /* section number of entry point */
    5150  unsigned char o_sntext[2];            /* section number of .text section */
     
    6362  unsigned char bsize[8];               /* uninitialized data "   "     */
    6463  unsigned char entry[8];               /* entry pt.                    */
    65   unsigned char o_maxstack[8];  /* max stack size (??)          */
    66   unsigned char o_maxdata[8];   /* max data size (??)           */
     64  unsigned char o_maxstack[8];          /* max stack size (??)          */
     65  unsigned char o_maxdata[8];           /* max data size (??)           */
    6766  unsigned char o_resv3[16];            /* reserved                     */
    6867}
     
    7372#define AOUTHDRSZ 72
    7473
    75 #define RS6K_AOUTHDR_OMAGIC     0x0107  /* old: text & data writeable */
    76 #define RS6K_AOUTHDR_NMAGIC     0x0108  /* new: text r/o, data r/w */
    77 #define RS6K_AOUTHDR_ZMAGIC     0x010B  /* paged: text r/o, both page-aligned */
    78 
    79 
    8074/********************** SECTION HEADER **********************/
    8175
    82 
    83 struct external_scnhdr {
    84         char    s_name[8];              /* section name                 */
    85         char    s_paddr[8];     /* physical address, aliased s_nlib */
    86         char    s_vaddr[8];     /* virtual address              */
    87         char    s_size[8];      /* section size                 */
    88         char    s_scnptr[8];    /* file ptr to raw data for section */
    89         char    s_relptr[8];    /* file ptr to relocation       */
    90         char    s_lnnoptr[8];   /* file ptr to line numbers     */
    91         char    s_nreloc[4];    /* number of relocation entries */
    92         char    s_nlnno[4];     /* number of line number entries*/
    93         char    s_flags[4];             /* flags                        */
    94         char    s_pad[4];               /* padding */ 
    95 };
    96 
    97 /*
    98  * names of "special" sections
    99  */
    100 #define _TEXT   ".text"
    101 #define _DATA   ".data"
    102 #define _BSS    ".bss"
    103 #define _PAD    ".pad"
    104 #define _LOADER ".loader"
     76struct external_scnhdr
     77{
     78  char  s_name[8];      /* section name                 */
     79  char  s_paddr[8];     /* physical address, aliased s_nlib */
     80  char  s_vaddr[8];     /* virtual address              */
     81  char  s_size[8];      /* section size                 */
     82  char  s_scnptr[8];    /* file ptr to raw data for section */
     83  char  s_relptr[8];    /* file ptr to relocation       */
     84  char  s_lnnoptr[8];   /* file ptr to line numbers     */
     85  char  s_nreloc[4];    /* number of relocation entries */
     86  char  s_nlnno[4];     /* number of line number entries*/
     87  char  s_flags[4];     /* flags                        */
     88  char  s_pad[4];       /* padding */ 
     89};
    10590
    10691#define SCNHDR  struct external_scnhdr
     
    10893#define SCNHSZ  72
    10994
    110 /* XCOFF uses a special .loader section with type STYP_LOADER.  */
    111 #define STYP_LOADER 0x1000
    112 
    113 /* XCOFF uses a special .debug section with type STYP_DEBUG.  */
    114 #define STYP_DEBUG 0x2000
    115 
    116 /* XCOFF handles line number or relocation overflow by creating
    117    another section header with STYP_OVRFLO set.  */
    118 #define STYP_OVRFLO 0x8000
    119 
    12095/********************** LINE NUMBERS **********************/
    12196
    12297/* 1 line number entry for every "breakpointable" source line in a section.
    123  * Line numbers are grouped on a per function basis; first entry in a function
    124  * grouping will have l_lnno = 0 and in place of physical address will be the
    125  * symbol table index of the function name.
    126  */
    127 struct external_lineno {
    128         union {
    129                 char l_symndx[8];/* function name symbol index, iff l_lnno == 0*/
    130                 char l_paddr[8];        /* (physical) address of line number    */
    131         } l_addr;
    132         char l_lnno[4];         /* line number          */
    133 };
    134 
     98   Line numbers are grouped on a per function basis; first entry in a function
     99   grouping will have l_lnno = 0 and in place of physical address will be the
     100   symbol table index of the function name.  */
     101
     102struct external_lineno
     103{
     104  union
     105  {
     106    char l_symndx[4];   /* function name symbol index, iff l_lnno == 0*/
     107    char l_paddr[8];    /* (physical) address of line number    */
     108  } l_addr;
     109
     110  char l_lnno[4];       /* line number          */
     111};
    135112
    136113#define LINENO  struct external_lineno
    137114
    138115#define LINESZ  12
    139 
    140116
    141117/********************** SYMBOLS **********************/
     
    147123struct external_syment
    148124{
    149   union {
    150     char e_value[8];
    151   } e;
     125  char e_value[8];
    152126  char e_offset[4];
    153127  char e_scnum[2];
     
    157131};
    158132
    159 
    160 
    161133#define N_BTMASK        (017)
    162134#define N_TMASK         (060)
    163135#define N_BTSHFT        (4)
    164136#define N_TSHIFT        (2)
    165  
    166 
    167 union external_auxent {
    168 
     137
     138union external_auxent
     139{
    169140    struct {
    170141        union {
     
    222193#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)
    223194
    224 /* Values for auxtype field in XCOFF64, taken from AIX 4.3 sym.h */
     195/* Values for auxtype field in XCOFF64, taken from AIX 4.3 sym.h. */
    225196#define _AUX_EXCEPT     255
    226197#define _AUX_FCN        254
     
    229200#define _AUX_CSECT      251
    230201
    231 
    232 
    233202/********************** RELOCATION DIRECTIVES **********************/
    234203
    235 
    236 struct external_reloc {
     204struct external_reloc
     205{
    237206  char r_vaddr[8];
    238207  char r_symndx[4];
     
    240209  char r_type[1];
    241210};
    242 
    243211
    244212#define RELOC struct external_reloc
     
    250218/* For new sections we havn't heard of before */
    251219#define DEFAULT_SECTION_ALIGNMENT 4
     220
     221/* The ldhdr structure.  This appears at the start of the .loader
     222   section.  */
     223
     224struct external_ldhdr
     225{
     226  bfd_byte l_version[4];
     227  bfd_byte l_nsyms[4];
     228  bfd_byte l_nreloc[4];
     229  bfd_byte l_istlen[4];
     230  bfd_byte l_nimpid[4];
     231  bfd_byte l_stlen[4];
     232  bfd_byte l_impoff[8];
     233  bfd_byte l_stoff[8];
     234  bfd_byte l_symoff[8];
     235  bfd_byte l_rldoff[8];
     236};
     237#define LDHDRSZ (56)
     238
     239struct external_ldsym
     240{
     241  bfd_byte l_value[8];
     242  bfd_byte l_offset[4];
     243  bfd_byte l_scnum[2];
     244  bfd_byte l_smtype[1];
     245  bfd_byte l_smclas[1];
     246  bfd_byte l_ifile[4];
     247  bfd_byte l_parm[4];
     248};
     249
     250#define LDSYMSZ (24)
     251
     252struct external_ldrel
     253{
     254  bfd_byte l_vaddr[8];
     255  bfd_byte l_rtype[2];
     256  bfd_byte l_rsecnm[2];
     257  bfd_byte l_symndx[4];
     258};
     259
     260#define LDRELSZ (16)
  • branches/GNU/src/binutils/include/coff/sh.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 /* coff information for Hitachi SH
     1/* coff information for Renesas SH
    22   
    3    Copyright 2001 Free Software Foundation, Inc.
     3   Copyright 2001, 2003 Free Software Foundation, Inc.
    44
    55   This program is free software; you can redistribute it and/or modify
     
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
    31 
     19#ifdef COFF_WITH_PE
     20#define L_LNNO_SIZE 2
     21#else
     22#define L_LNNO_SIZE 4
     23#endif
     24#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
     25#include "coff/external.h"
    3226
    3327#define SH_ARCH_MAGIC_BIG       0x0500
     
    3630#define SH_PE_MAGIC             0x010b
    3731
    38 
    3932#define SHBADMAG(x) \
    40  (((x).f_magic!=SH_ARCH_MAGIC_BIG) && \
    41   ((x).f_magic!=SH_ARCH_MAGIC_WINCE) && \
    42   ((x).f_magic!=SH_ARCH_MAGIC_LITTLE))
    43 
    44 #define FILHDR  struct external_filehdr
    45 #define FILHSZ  20
    46 
    47 
    48 /********************** AOUT "OPTIONAL HEADER" **********************/
    49 
    50 
    51 typedef struct
    52 {
    53   char  magic[2];               /* type of file                         */
    54   char  vstamp[2];              /* version stamp                        */
    55   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    56   char  dsize[4];               /* initialized data "  "                */
    57   char  bsize[4];               /* uninitialized data "   "             */
    58   char  entry[4];               /* entry pt.                            */
    59   char  text_start[4];          /* base of text used for this file */
    60   char  data_start[4];          /* base of data used for this file */
    61 }
    62 AOUTHDR;
    63 
    64 
    65 #define AOUTHDRSZ 28
    66 #define AOUTSZ 28
    67 
    68 
     33 (((x).f_magic != SH_ARCH_MAGIC_BIG) && \
     34  ((x).f_magic != SH_ARCH_MAGIC_WINCE) && \
     35  ((x).f_magic != SH_ARCH_MAGIC_LITTLE))
    6936
    7037/* Define some NT default values.  */
     
    7542#define NT_DEF_COMMIT        0x1000
    7643
    77 /********************** SECTION HEADER **********************/
    78 
    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 /*
    94  * names of "special" sections
    95  */
    96 #define _TEXT   ".text"
    97 #define _DATA   ".data"
    98 #define _BSS    ".bss"
    99 
    100 
    101 #define SCNHDR  struct external_scnhdr
    102 #define SCNHSZ  40
    103 
    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 #ifdef COFF_WITH_PE
    118         char l_lnno[2]; /* line number          */
    119 #else
    120         char l_lnno[4]; /* line number          */
    121 #endif
    122 };
    123 
    124 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
    125 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val,  (bfd_byte *) (ext->l_lnno));
    126 
    127 #define LINENO  struct external_lineno
    128 #ifdef COFF_WITH_PE
    129 #define LINESZ  6
    130 #undef GET_LINENO_LNNO
    131 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
    132 #undef PUT_LINENO_LNNO
    133 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val,  (bfd_byte *) (ext->l_lnno));
    134 #else
    135 #define LINESZ  8
    136 #endif
    137 
    138 
    139 /********************** SYMBOLS **********************/
    140 
    141 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    142 #define E_FILNMLEN      14      /* # characters in a file name          */
    143 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    144 
    145 struct external_syment
    146 {
    147   union {
    148     char e_name[E_SYMNMLEN];
    149     struct {
    150       char e_zeroes[4];
    151       char e_offset[4];
    152     } e;
    153   } e;
    154   char e_value[4];
    155   char e_scnum[2];
    156   char e_type[2];
    157   char e_sclass[1];
    158   char e_numaux[1];
    159 };
    160 
    161 
    162 
    163 #define N_BTMASK        (017)
    164 #define N_TMASK         (060)
    165 #define N_BTSHFT        (4)
    166 #define N_TSHIFT        (2)
    167  
    168 
    169 union external_auxent {
    170         struct {
    171                 char x_tagndx[4];       /* str, un, or enum tag indx */
    172                 union {
    173                         struct {
    174                             char  x_lnno[2]; /* declaration line number */
    175                             char  x_size[2]; /* str/union/array size */
    176                         } x_lnsz;
    177                         char x_fsize[4];        /* size of function */
    178                 } x_misc;
    179                 union {
    180                         struct {                /* if ISFCN, tag, or .bb */
    181                             char x_lnnoptr[4];  /* ptr to fcn line # */
    182                             char x_endndx[4];   /* entry ndx past block end */
    183                         } x_fcn;
    184                         struct {                /* if ISARY, up to 4 dimen. */
    185                             char x_dimen[E_DIMNUM][2];
    186                         } x_ary;
    187                 } x_fcnary;
    188                 char x_tvndx[2];                /* tv index */
    189         } x_sym;
    190 
    191         union {
    192                 char x_fname[E_FILNMLEN];
    193                 struct {
    194                         char x_zeroes[4];
    195                         char x_offset[4];
    196                 } x_n;
    197         } x_file;
    198 
    199         struct {
    200                 char x_scnlen[4];                       /* section length */
    201                 char x_nreloc[2];       /* # relocation entries */
    202                 char x_nlinno[2];       /* # line numbers */
    203                 char x_checksum[4];     /* section COMDAT checksum */
    204                 char x_associated[2];   /* COMDAT associated section index */
    205                 char x_comdat[1];       /* COMDAT selection number */
    206         } x_scn;
    207 
    208         struct {
    209                 char x_tvfill[4];       /* tv fill value */
    210                 char x_tvlen[2];        /* length of .tv */
    211                 char x_tvran[2][2];     /* tv range */
    212         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    213 
    214 
    215 };
    216 
    217 #define SYMENT  struct external_syment
    218 #define SYMESZ  18     
    219 #define AUXENT  union external_auxent
    220 #define AUXESZ  18
    221 
    222 
    223 
    22444/********************** RELOCATION DIRECTIVES **********************/
    22545
    22646/* The external reloc has an offset field, because some of the reloc
    22747   types on the h8 don't have room in the instruction for the entire
    228    offset - eg the strange jump and high page addressing modes */
     48   offset - eg the strange jump and high page addressing modes. */
    22949
    23050#ifndef COFF_WITH_PE
    231 struct external_reloc {
     51struct external_reloc
     52{
    23253  char r_vaddr[4];
    23354  char r_symndx[4];
     
    23758};
    23859#else
    239 struct external_reloc {
     60struct external_reloc
     61{
    24062  char r_vaddr[4];
    24163  char r_symndx[4];
     
    24365};
    24466#endif
    245 
    24667
    24768#define RELOC struct external_reloc
  • branches/GNU/src/binutils/include/coff/sparc.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    2323   be used with different systems while still yielding the same results.  */
    2424
    25 /********************** FILE HEADER **********************/
    26 
    27 struct external_filehdr
    28 {
    29   char f_magic[2];              /* magic number                 */
    30   char f_nscns[2];              /* number of sections           */
    31   char f_timdat[4];             /* time & date stamp            */
    32   char f_symptr[4];             /* file pointer to symtab       */
    33   char f_nsyms[4];              /* number of symtab entries     */
    34   char f_opthdr[2];             /* sizeof(optional hdr)         */
    35   char f_flags[2];              /* flags                        */
    36 };
     25#define L_LNNO_SIZE 2
     26#define DO_NOT_DEFINE_SYMENT
     27#define DO_NOT_DEFINE_AUXENT
     28#include "coff/external.h"
    3729
    3830#define F_RELFLG        (0x0001)        /* relocation info stripped */
     
    4739#define LYNXCOFFMAGIC   (0415)
    4840
    49 #define FILHDR  struct external_filehdr
    50 #define FILHSZ  20
    51 
    52 /********************** AOUT "OPTIONAL HEADER" **********************/
    53 
    54 typedef struct
    55 {
    56   char magic[2];                /* type of file                         */
    57   char vstamp[2];               /* version stamp                        */
    58   char tsize[4];                /* text size in bytes, padded to FW bdry*/
    59   char dsize[4];                /* initialized data "  "                */
    60   char bsize[4];                /* uninitialized data "   "             */
    61   char entry[4];                /* entry pt.                            */
    62   char text_start[4];           /* base of text used for this file */
    63   char data_start[4];           /* base of data used for this file */
    64 }
    65 AOUTHDR;
    66 
    67 #define AOUTSZ 28
    68 #define AOUTHDRSZ 28
    69 
    7041#define OMAGIC          0404    /* object files, eg as output */
    7142#define ZMAGIC          0413    /* demand load format, eg normal ld output */
     
    7344#define SHMAGIC         0443    /* host   shlib */
    7445
    75 /********************** SECTION HEADER **********************/
     46/* More names of "special" sections. */
    7647
    77 struct external_scnhdr
    78 {
    79   char s_name[8];               /* section name                 */
    80   char s_paddr[4];              /* physical address, aliased s_nlib */
    81   char s_vaddr[4];              /* virtual address              */
    82   char s_size[4];               /* section size                 */
    83   char s_scnptr[4];             /* file ptr to raw data for section */
    84   char s_relptr[4];             /* file ptr to relocation       */
    85   char s_lnnoptr[4];            /* file ptr to line numbers     */
    86   char s_nreloc[2];             /* number of relocation entries */
    87   char s_nlnno[2];              /* number of line number entries*/
    88   char s_flags[4];              /* flags                        */
    89 };
    90 
    91 #define SCNHDR  struct external_scnhdr
    92 #define SCNHSZ  40
    93 
    94 /* Names of "special" sections. */
    95 
    96 #define _TEXT   ".text"
    97 #define _DATA   ".data"
    98 #define _BSS    ".bss"
    9948#define _TV     ".tv"
    10049#define _INIT   ".init"
    10150#define _FINI   ".fini"
    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 {
    114   union {
    115     char l_symndx[4];           /* fn name symbol index, iff l_lnno == 0 */
    116     char l_paddr[4];            /* (physical) address of line number */
    117   } l_addr;
    118   char l_lnno[2];               /* line number */
    119 };
    120 
    121 #define LINENO  struct external_lineno
    122 #define LINESZ  (6)
    12351
    12452/********************** SYMBOLS **********************/
     
    214142/********************** RELOCATION DIRECTIVES **********************/
    215143
    216 struct external_reloc {
     144struct external_reloc
     145{
    217146  char r_vaddr[4];
    218147  char r_symndx[4];
  • branches/GNU/src/binutils/include/coff/ti.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1818   along with this program; if not, write to the Free Software
    1919   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    20 
    2120#ifndef COFF_TI_H
    2221#define COFF_TI_H
    2322
     23/* Note "coff/external.h is not used because TI adds extra fields to the structures.  */
     24
    2425/********************** FILE HEADER **********************/
    2526
    26 struct external_filehdr {
    27         char f_magic[2];        /* magic number                 */
    28         char f_nscns[2];        /* number of sections           */
    29         char f_timdat[4];       /* time & date stamp            */
    30         char f_symptr[4];       /* file pointer to symtab       */
    31         char f_nsyms[4];        /* number of symtab entries     */
    32         char f_opthdr[2];       /* sizeof(optional hdr)         */
    33         char f_flags[2];        /* flags                        */
    34         char f_target_id[2];    /* magic no. (TI COFF-specific) */
    35 };
     27struct external_filehdr
     28  {
     29    char f_magic[2];    /* magic number                 */
     30    char f_nscns[2];    /* number of sections           */
     31    char f_timdat[4];   /* time & date stamp            */
     32    char f_symptr[4];   /* file pointer to symtab       */
     33    char f_nsyms[4];    /* number of symtab entries     */
     34    char f_opthdr[2];   /* sizeof(optional hdr)         */
     35    char f_flags[2];    /* flags                        */
     36    char f_target_id[2];    /* magic no. (TI COFF-specific) */
     37  };
    3638
    3739/* COFF0 has magic number in f_magic, and omits f_target_id from the file
     
    5456#ifndef TICOFF_TARGET_ARCH
    5557#error "TICOFF_TARGET_ARCH needs to be defined for your CPU"
     58#endif
     59
     60#ifndef TICOFF_TARGET_MACHINE_GET
     61#define TICOFF_TARGET_MACHINE_GET(FLAGS) 0
     62#endif
     63
     64#ifndef TICOFF_TARGET_MACHINE_SET
     65#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)
    5666#endif
    5767
     
    90100/* we need to read/write an extra field in the coff file header */
    91101#ifndef COFF_ADJUST_FILEHDR_IN_POST
    92 #define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \
    93 do { ((struct internal_filehdr *)(dst))->f_target_id = \
    94 bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \
    95 } while(0)
     102#define COFF_ADJUST_FILEHDR_IN_POST(abfd, src, dst) \
     103  do                                                                    \
     104    {                                                                   \
     105      ((struct internal_filehdr *)(dst))->f_target_id =                 \
     106        H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id);                \
     107    }                                                                   \
     108  while (0)
    96109#endif
    97110
    98111#ifndef COFF_ADJUST_FILEHDR_OUT_POST
    99 #define COFF_ADJUST_FILEHDR_OUT_POST(abfd,src,dst) \
    100 do { bfd_h_put_16(abfd, ((struct internal_filehdr *)(src))->f_target_id, \
    101              (bfd_byte *)(((FILHDR *)(dst))->f_target_id)); \
    102 } while(0)
     112#define COFF_ADJUST_FILEHDR_OUT_POST(abfd, src, dst) \
     113  do                                                                    \
     114    {                                                                   \
     115      H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id,  \
     116               ((FILHDR *)(dst))->f_target_id);                         \
     117    }                                                                   \
     118  while (0)
    103119#endif
    104120
     
    111127#define F_EXEC          (0x0002)
    112128#define F_LNNO          (0x0004)
     129#define F_VERS          (0x0010) /* TMS320C4x code */
    113130/* F_LSYMS needs to be redefined in your source file */
    114131#define F_LSYMS_TICOFF  (0x0010) /* normal COFF is 0x8 */
     
    199216   accordingly
    200217 */
    201 #define GET_SCNHDR_NRELOC(ABFD,PTR) \
    202 (COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, PTR))
    203 #define PUT_SCNHDR_NRELOC(ABFD,VAL,PTR) \
    204 (COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,PTR))
    205 #define GET_SCNHDR_NLNNO(ABFD,PTR) \
    206 (COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-2))
    207 #define PUT_SCNHDR_NLNNO(ABFD,VAL,PTR) \
    208 (COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-2))
    209 #define GET_SCNHDR_FLAGS(ABFD,PTR) \
    210 (COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-4))
    211 #define PUT_SCNHDR_FLAGS(ABFD,VAL,PTR) \
    212 (COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-4))
    213 #define GET_SCNHDR_PAGE(ABFD,PTR) \
    214 (COFF2_P(ABFD) ? bfd_h_get_16 (ABFD,PTR) : bfd_h_get_8 (ABFD, (PTR)-7))
     218#define GET_SCNHDR_NRELOC(ABFD, PTR) \
     219  (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, PTR))
     220#define PUT_SCNHDR_NRELOC(ABFD, VAL, PTR) \
     221  (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, PTR))
     222#define GET_SCNHDR_NLNNO(ABFD, PTR) \
     223  (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -2))
     224#define PUT_SCNHDR_NLNNO(ABFD, VAL, PTR) \
     225  (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -2))
     226#define GET_SCNHDR_FLAGS(ABFD, PTR) \
     227  (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -4))
     228#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \
     229  (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
     230#define GET_SCNHDR_PAGE(ABFD, PTR) \
     231  (COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : (unsigned) H_GET_8 (ABFD, (PTR) -7))
    215232/* on output, make sure that the "reserved" field is zero */
    216 #define PUT_SCNHDR_PAGE(ABFD,VAL,PTR) \
    217 (COFF2_P(ABFD) ? bfd_h_put_16 (ABFD,VAL,PTR) : \
    218 bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8))
     233#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \
     234  (COFF2_P (ABFD) \
     235   ? H_PUT_16 (ABFD, VAL, PTR) \
     236   : H_PUT_8 (ABFD, VAL, (PTR) -7), H_PUT_8 (ABFD, 0, (PTR) -8))
    219237
    220238/* TI COFF stores section size as number of bytes (address units, not octets),
    221239   so adjust to be number of octets, which is what BFD expects */
    222 #define GET_SCNHDR_SIZE(ABFD,SZP) \
    223 (bfd_h_get_32(ABFD,SZP)*bfd_octets_per_byte(ABFD))
    224 #define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \
    225 bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP)
    226 
    227 #define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \
    228 do { ((struct internal_scnhdr *)(INT))->s_page = \
    229 GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \
    230 } while(0)
     240#define GET_SCNHDR_SIZE(ABFD, SZP) \
     241  (H_GET_32 (ABFD, SZP) * bfd_octets_per_byte (ABFD))
     242#define PUT_SCNHDR_SIZE(ABFD, SZ, SZP) \
     243  H_PUT_32 (ABFD, (SZ) / bfd_octets_per_byte (ABFD), SZP)
     244
     245#define COFF_ADJUST_SCNHDR_IN_POST(ABFD, EXT, INT) \
     246  do                                                                    \
     247    {                                                                   \
     248      ((struct internal_scnhdr *)(INT))->s_page =                       \
     249        GET_SCNHDR_PAGE (ABFD, ((SCNHDR *)(EXT))->s_page);              \
     250    }                                                                   \
     251   while (0)
    231252
    232253/* The line number and reloc overflow checking in coff_swap_scnhdr_out in
     
    235256   fields.
    236257 */
    237 #define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \
    238 do { \
    239 PUT_SCNHDR_NLNNO(ABFD,((struct internal_scnhdr *)(INT))->s_nlnno,\
    240                 (bfd_byte *)((SCNHDR *)(EXT))->s_nlnno); \
    241 PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\
    242                 (bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \
    243 PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
    244                 (bfd_byte *)((SCNHDR *)(EXT))->s_flags); \
    245 PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \
    246                 (bfd_byte *)((SCNHDR *)(EXT))->s_page); \
    247 } while(0)
    248 
    249 /* Page macros
    250 
    251    The first GDB port requires flags in its remote memory access commands to
    252    distinguish between data/prog space.  Hopefully we can make this go away
    253    eventually.  Stuff the page in the upper bits of a 32-bit address, since
    254    the c5x family only uses 16 or 23 bits.
    255 
    256    c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
    257    23-bit program addresses.  Make sure the page flags don't interfere.
    258    These flags are used by GDB to identify the destination page for
    259    addresses.
    260 */
    261 
    262 /* recognized load pages */
    263 #define PG_PROG         0x0         /* PROG page */
    264 #define PG_DATA         0x1         /* DATA page */
    265 
    266 #define ADDR_MASK       0x00FFFFFF
    267 #define PG_TO_FLAG(p)   (((unsigned long)(p) & 0xFF) << 24)
    268 #define FLAG_TO_PG(f)   (((f) >> 24) & 0xFF)
     258#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD, INT, EXT) \
     259  do                                                                       \
     260    {                                                                      \
     261      PUT_SCNHDR_NLNNO (ABFD, ((struct internal_scnhdr *)(INT))->s_nlnno,  \
     262                        ((SCNHDR *)(EXT))->s_nlnno);                       \
     263      PUT_SCNHDR_NRELOC (ABFD, ((struct internal_scnhdr *)(INT))->s_nreloc,\
     264                         ((SCNHDR *)(EXT))->s_nreloc);                     \
     265      PUT_SCNHDR_FLAGS (ABFD, ((struct internal_scnhdr *)(INT))->s_flags,  \
     266                        ((SCNHDR *)(EXT))->s_flags);                       \
     267      PUT_SCNHDR_PAGE (ABFD, ((struct internal_scnhdr *)(INT))->s_page,    \
     268                       ((SCNHDR *)(EXT))->s_page);                         \
     269    }                                                                      \
     270   while (0)
    269271
    270272/*
     
    385387
    386388/* section lengths are in target bytes (not host bytes) */
    387 #define GET_SCN_SCNLEN(ABFD,EXT) \
    388 (bfd_h_get_32(ABFD,(bfd_byte *)(EXT)->x_scn.x_scnlen)*bfd_octets_per_byte(ABFD))
    389 #define PUT_SCN_SCNLEN(ABFD,INT,EXT) \
    390 bfd_h_put_32(ABFD,(INT)/bfd_octets_per_byte(ABFD),\
    391              (bfd_byte *)(EXT)->x_scn.x_scnlen)
     389#define GET_SCN_SCNLEN(ABFD, EXT) \
     390  (H_GET_32 (ABFD, (EXT)->x_scn.x_scnlen) * bfd_octets_per_byte (ABFD))
     391#define PUT_SCN_SCNLEN(ABFD, INT, EXT) \
     392  H_PUT_32 (ABFD, (INT) / bfd_octets_per_byte (ABFD), (EXT)->x_scn.x_scnlen)
    392393
    393394/* lnsz size is in bits in COFF file, in bytes in BFD */
    394395#define GET_LNSZ_SIZE(abfd, ext) \
    395 (bfd_h_get_16(abfd, (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size) / \
    396  (class != C_FIELD ? 8 : 1))
     396 (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1))
    397397
    398398#define PUT_LNSZ_SIZE(abfd, in, ext) \
    399  bfd_h_put_16(abfd, ((class != C_FIELD) ? (in)*8 : (in)), \
    400               (bfd_byte*) ext->x_sym.x_misc.x_lnsz.x_size)
     399  H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \
     400          ext->x_sym.x_misc.x_lnsz.x_size)
    401401 
    402 /* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes */
    403 #define COFF_ADJUST_SYM_IN_POST(ABFD,EXT,INT) \
    404 do { struct internal_syment *dst = (struct internal_syment *)(INT); \
    405 if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) dst->n_value /= 8; \
    406 } while (0)
    407 
    408 #define COFF_ADJUST_SYM_OUT_POST(ABFD,INT,EXT) \
    409 do { struct internal_syment *src = (struct internal_syment *)(INT); \
    410 SYMENT *dst = (SYMENT *)(EXT); \
    411 if(src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
    412 bfd_h_put_32(abfd,src->n_value * 8,(bfd_byte *)dst->e_value); \
    413 } while (0)
     402/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes
     403   Also put the load page flag of the section into the symbol value if it's an
     404   address.  */
     405#ifndef NEEDS_PAGE
     406#define NEEDS_PAGE(X) 0
     407#define PAGE_MASK 0
     408#endif
     409#define COFF_ADJUST_SYM_IN_POST(ABFD, EXT, INT) \
     410  do                                                                    \
     411    {                                                                   \
     412      struct internal_syment *dst = (struct internal_syment *)(INT);    \
     413      if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU)             \
     414        dst->n_value /= 8;                                              \
     415      else if (NEEDS_PAGE (dst->n_sclass)) {                            \
     416        asection *scn = coff_section_from_bfd_index (abfd, dst->n_scnum); \
     417        dst->n_value |= (scn->lma & PAGE_MASK);                         \
     418      }                                                                 \
     419    }                                                                   \
     420   while (0)
     421
     422#define COFF_ADJUST_SYM_OUT_POST(ABFD, INT, EXT) \
     423  do                                                                    \
     424    {                                                                   \
     425       struct internal_syment *src = (struct internal_syment *)(INT);   \
     426       SYMENT *dst = (SYMENT *)(EXT);                                   \
     427       if (src->n_sclass == C_MOU || src->n_sclass == C_MOS)            \
     428         H_PUT_32 (abfd, src->n_value * 8, dst->e_value);               \
     429       else if (NEEDS_PAGE (src->n_sclass)) {                           \
     430         H_PUT_32 (abfd, src->n_value &= ~PAGE_MASK, dst->e_value);     \
     431       }                                                                \
     432    }                                                                   \
     433   while (0)
    414434
    415435/* Detect section-relative absolute symbols so they get flagged with a sym
    416436   index of -1.
    417437*/
    418 #define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC,SECT) \
    419 ((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
    420  && (RELOC)->howto->name[0] == 'A')
     438#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC, SECT) \
     439  ((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
     440   && (RELOC)->howto->name[0] == 'A')
    421441
    422442/********************** RELOCATION DIRECTIVES **********************/
    423443
    424 struct external_reloc_v0 {
     444struct external_reloc_v0
     445{
    425446  char r_vaddr[4];
    426447  char r_symndx[2];
     
    429450};
    430451
    431 struct external_reloc {
     452struct external_reloc
     453{
    432454  char r_vaddr[4];
    433455  char r_symndx[4];
  • branches/GNU/src/binutils/include/coff/tic30.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
     19#define L_LNNO_SIZE 4
     20#include "coff/external.h"
    3121
    3222#define TIC30MAGIC      0xC000
    3323
    34 #define TIC30BADMAG(x) (((x).f_magic!=TIC30MAGIC))
    35 
    36 #define FILHDR  struct external_filehdr
    37 #define FILHSZ  20
    38 
    39 
    40 /********************** AOUT "OPTIONAL HEADER" **********************/
    41 
    42 
    43 typedef struct
    44 {
    45   char  magic[2];               /* type of file                         */
    46   char  vstamp[2];              /* version stamp                        */
    47   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    48   char  dsize[4];               /* initialized data "  "                */
    49   char  bsize[4];               /* uninitialized data "   "             */
    50   char  entry[4];               /* entry pt.                            */
    51   char  text_start[4];          /* base of text used for this file */
    52   char  data_start[4];          /* base of data used for this file */
    53 }
    54 AOUTHDR;
    55 
    56 
    57 #define AOUTHDRSZ 28
    58 #define AOUTSZ 28
    59 
    60 
    61 
    62 
    63 /********************** SECTION HEADER **********************/
    64 
    65 
    66 struct external_scnhdr {
    67         char            s_name[8];      /* section name                 */
    68         char            s_paddr[4];     /* physical address, aliased s_nlib */
    69         char            s_vaddr[4];     /* virtual address              */
    70         char            s_size[4];      /* section size                 */
    71         char            s_scnptr[4];    /* file ptr to raw data for section */
    72         char            s_relptr[4];    /* file ptr to relocation       */
    73         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    74         char            s_nreloc[2];    /* number of relocation entries */
    75         char            s_nlnno[2];     /* number of line number entries*/
    76         char            s_flags[4];     /* flags                        */
    77 };
    78 
    79 /*
    80  * names of "special" sections
    81  */
    82 #define _TEXT   ".text"
    83 #define _DATA   ".data"
    84 #define _BSS    ".bss"
    85 
    86 
    87 #define SCNHDR  struct external_scnhdr
    88 #define SCNHSZ  40
    89 
    90 
    91 /********************** LINE NUMBERS **********************/
    92 
    93 /* 1 line number entry for every "breakpointable" source line in a section.
    94  * Line numbers are grouped on a per function basis; first entry in a function
    95  * grouping will have l_lnno = 0 and in place of physical address will be the
    96  * symbol table index of the function name.
    97  */
    98 struct external_lineno {
    99         union {
    100                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    101                 char l_paddr[4];        /* (physical) address of line number    */
    102         } l_addr;
    103         char l_lnno[4]; /* line number          */
    104 };
    105 
    106 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
    107 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val,  (bfd_byte *) (ext->l_lnno));
    108 
    109 #define LINENO  struct external_lineno
    110 #define LINESZ  8
    111 
    112 
    113 /********************** SYMBOLS **********************/
    114 
    115 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    116 #define E_FILNMLEN      14      /* # characters in a file name          */
    117 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    118 
    119 struct external_syment
    120 {
    121   union {
    122     char e_name[E_SYMNMLEN];
    123     struct {
    124       char e_zeroes[4];
    125       char e_offset[4];
    126     } e;
    127   } e;
    128   char e_value[4];
    129   char e_scnum[2];
    130   char e_type[2];
    131   char e_sclass[1];
    132   char e_numaux[1];
    133 };
    134 
    135 
    136 
    137 #define N_BTMASK        (017)
    138 #define N_TMASK         (060)
    139 #define N_BTSHFT        (4)
    140 #define N_TSHIFT        (2)
    141  
    142 
    143 union external_auxent {
    144   struct {
    145         char x_tagndx[4];       /* str, un, or enum tag indx */
    146         union {
    147           struct {
    148                 char  x_lnno[2]; /* declaration line number */
    149                 char  x_size[2]; /* str/union/array size */
    150           } x_lnsz;
    151           char x_fsize[4];      /* size of function */
    152         } x_misc;
    153         union {
    154           struct {              /* if ISFCN, tag, or .bb */
    155                 char x_lnnoptr[4];      /* ptr to fcn line # */
    156                 char x_endndx[4];       /* entry ndx past block end */
    157           } x_fcn;
    158           struct {              /* if ISARY, up to 4 dimen. */
    159                 char x_dimen[E_DIMNUM][2];
    160           } x_ary;
    161         } x_fcnary;
    162         char x_tvndx[2];                /* tv index */
    163   } x_sym;
    164  
    165   union {
    166         char x_fname[E_FILNMLEN];
    167         struct {
    168           char x_zeroes[4];
    169           char x_offset[4];
    170         } x_n;
    171   } x_file;
    172  
    173   struct {
    174         char x_scnlen[4];                       /* section length */
    175         char x_nreloc[2];       /* # relocation entries */
    176         char x_nlinno[2];       /* # line numbers */
    177   } x_scn;
    178  
    179   struct {
    180         char x_tvfill[4];       /* tv fill value */
    181         char x_tvlen[2];        /* length of .tv */
    182         char x_tvran[2][2];     /* tv range */
    183   } x_tv;               /* info about .tv section (in auxent of symbol .tv)) */
    184  
    185 
    186 };
    187 
    188 #define SYMENT  struct external_syment
    189 #define SYMESZ  18     
    190 #define AUXENT  union external_auxent
    191 #define AUXESZ  18
    192 
    193 
     24#define TIC30BADMAG(x) (((x).f_magic != TIC30MAGIC))
    19425
    19526/********************** RELOCATION DIRECTIVES **********************/
     
    19930   offset - eg with segments */
    20031
    201 struct external_reloc {
     32struct external_reloc
     33{
    20234  char r_vaddr[4];
    20335  char r_symndx[4];
     
    20638  char r_stuff[2];
    20739};
    208 
    20940
    21041#define RELOC struct external_reloc
  • branches/GNU/src/binutils/include/coff/tic54x.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1919
    2020#ifndef COFF_TIC54X_H
     21#define COFF_TIC54X_H
    2122
    22 #define COFF_TIC54X_H
    2323#define TIC54X_TARGET_ID 0x98
    2424#define TIC54XALGMAGIC  0x009B  /* c54x algebraic assembler output */
     
    3030#define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */
    3131
     32/* Page macros
     33
     34   The first GDB port requires flags in its remote memory access commands to
     35   distinguish between data/prog space.  Hopefully we can make this go away
     36   eventually.  Stuff the page in the upper bits of a 32-bit address, since
     37   the c5x family only uses 16 or 23 bits.
     38
     39   c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
     40   23-bit program addresses.  Make sure the page flags don't interfere.
     41   These flags are used by GDB to identify the destination page for
     42   addresses.
     43*/
     44
     45/* Recognized load pages (by common convention).  */
     46#define PG_PROG         0x0         /* PROG page */
     47#define PG_DATA         0x1         /* DATA page */
     48#define PG_IO           0x2         /* I/O page */
     49
     50/** Indicate whether the given storage class requires a page flag.  */
     51#define NEEDS_PAGE(X) ((X)==C_EXT)
     52#define PAGE_MASK       0xFF000000
     53#define ADDR_MASK       0x00FFFFFF
     54#define PG_TO_FLAG(p)   (((unsigned long)(p) & 0xFF) << 24)
     55#define FLAG_TO_PG(f)   (((f) >> 24) & 0xFF)
     56
    3257#include "coff/ti.h"
    3358
  • branches/GNU/src/binutils/include/coff/tic80.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
     19#define DO_NOT_DEFINE_FILHDR
     20#define DO_NOT_DEFINE_SCNHDR
     21#define L_LNNO_SIZE 2
     22#include "coff/external.h"
     23
    1924/********************** FILE HEADER **********************/
    2025
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29         char f_target_id[2];    /* target id (TIc80 specific)   */
     26struct external_filehdr
     27  {
     28    char f_magic[2];    /* magic number                 */
     29    char f_nscns[2];    /* number of sections           */
     30    char f_timdat[4];   /* time & date stamp            */
     31    char f_symptr[4];   /* file pointer to symtab       */
     32    char f_nsyms[4];    /* number of symtab entries     */
     33    char f_opthdr[2];   /* sizeof(optional hdr)         */
     34    char f_flags[2];    /* flags                        */
     35    char f_target_id[2];/* target id (TIc80 specific)   */
    3036};
    3137
     
    3844#define FILHSZ  22
    3945
    40 
    41 /********************** AOUT "OPTIONAL HEADER" **********************/
    42 
    43 
    44 typedef struct
    45 {
    46   char  magic[2];               /* type of file                         */
    47   char  vstamp[2];              /* version stamp                        */
    48   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    49   char  dsize[4];               /* initialized data "  "                */
    50   char  bsize[4];               /* uninitialized data "   "             */
    51   char  entry[4];               /* entry pt.                            */
    52   char  text_start[4];          /* base of text used for this file */
    53   char  data_start[4];          /* base of data used for this file */
    54 }
    55 AOUTHDR;
    56 
    5746#define TIC80_AOUTHDR_MAGIC     0x108   /* Goes in the optional file header magic number field */
    58 
    59 #define AOUTHDRSZ 28
    60 #define AOUTSZ 28
    61 
    62 
    63 
    6447
    6548/********************** SECTION HEADER **********************/
    6649
    67 
    68 struct external_scnhdr {
     50struct external_scnhdr
     51{
    6952        char            s_name[8];      /* section name                 */
    7053        char            s_paddr[4];     /* physical address, aliased s_nlib */
     
    8164};
    8265
    83 /*
    84  * names of "special" sections
    85  */
     66/* Names of "special" sections.  */
    8667#define _TEXT   ".text"
    8768#define _DATA   ".data"
     
    9374#define _SYSMEM ".sysmem"
    9475
    95 
    9676#define SCNHDR  struct external_scnhdr
    9777#define SCNHSZ  40
    98 
    99 
    100 /********************** LINE NUMBERS **********************/
    101 
    102 /* 1 line number entry for every "breakpointable" source line in a section.
    103  * Line numbers are grouped on a per function basis; first entry in a function
    104  * grouping will have l_lnno = 0 and in place of physical address will be the
    105  * symbol table index of the function name.
    106  */
    107 struct external_lineno {
    108         union {
    109                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    110                 char l_paddr[4];        /* (physical) address of line number    */
    111         } l_addr;
    112         char l_lnno[2];                 /* line number  */
    113 };
    114 
    115 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
    116 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val,  (bfd_byte *) (ext->l_lnno));
    117 
    118 #define LINENO  struct external_lineno
    119 #define LINESZ  6
    120 
    121 
    122 /********************** SYMBOLS **********************/
    123 
    124 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    125 #define E_FILNMLEN      14      /* # characters in a file name          */
    126 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    127 
    128 struct external_syment
    129 {
    130   union {
    131     char e_name[E_SYMNMLEN];
    132     struct {
    133       char e_zeroes[4];
    134       char e_offset[4];
    135     } e;
    136   } e;
    137   char e_value[4];
    138   char e_scnum[2];
    139   char e_type[2];
    140   char e_sclass[1];
    141   char e_numaux[1];
    142 };
    143 
    144 
    145 
    146 #define N_BTMASK        (017)
    147 #define N_TMASK         (060)
    148 #define N_BTSHFT        (4)
    149 #define N_TSHIFT        (2)
    15078 
    151 /* FIXME - need to correlate with TIc80 Code Generation Tools User's Guide, CG:A-25 */
    152 union external_auxent {
    153         struct {
    154                 char x_tagndx[4];       /* str, un, or enum tag indx */
    155                 union {
    156                         struct {
    157                             char  x_lnno[2]; /* declaration line number */
    158                             char  x_size[2]; /* str/union/array size */
    159                         } x_lnsz;
    160                         char x_fsize[4];        /* size of function */
    161                 } x_misc;
    162                 union {
    163                         struct {                /* if ISFCN, tag, or .bb */
    164                             char x_lnnoptr[4];  /* ptr to fcn line # */
    165                             char x_endndx[4];   /* entry ndx past block end */
    166                         } x_fcn;
    167                         struct {                /* if ISARY, up to 4 dimen. */
    168                             char x_dimen[E_DIMNUM][2];
    169                         } x_ary;
    170                 } x_fcnary;
    171                 char x_tvndx[2];                /* tv index */
    172         } x_sym;
    173 
    174         union {
    175                 char x_fname[E_FILNMLEN];
    176                 struct {
    177                         char x_zeroes[4];
    178                         char x_offset[4];
    179                 } x_n;
    180         } x_file;
    181 
    182         struct {
    183                 char x_scnlen[4];                       /* section length */
    184                 char x_nreloc[2];       /* # relocation entries */
    185                 char x_nlinno[2];       /* # line numbers */
    186         } x_scn;
    187 
    188         struct {
    189                 char x_tvfill[4];       /* tv fill value */
    190                 char x_tvlen[2];        /* length of .tv */
    191                 char x_tvran[2][2];     /* tv range */
    192         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    193 
    194 
    195 };
    196 
    197 #define SYMENT  struct external_syment
    198 #define SYMESZ  18     
    199 #define AUXENT  union external_auxent
    200 #define AUXESZ  18
    201 
    202 
     79/* FIXME - need to correlate external_auxent with
     80   TIc80 Code Generation Tools User's Guide, CG:A-25 */
    20381
    20482/********************** RELOCATION DIRECTIVES **********************/
     
    20684/* The external reloc has an offset field, because some of the reloc
    20785   types on the h8 don't have room in the instruction for the entire
    208    offset - eg the strange jump and high page addressing modes */
     86   offset - eg the strange jump and high page addressing modes. */
    20987
    210 struct external_reloc {
     88struct external_reloc
     89{
    21190  char r_vaddr[4];
    21291  char r_symndx[4];
     
    21493  char r_type[2];
    21594};
    216 
    21795
    21896#define RELOC struct external_reloc
  • branches/GNU/src/binutils/include/coff/w65.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
    31 
     19#define L_LNNO_SIZE 4
     20#include "coff/external.h"
    3221
    3322#define W65MAGIC        0x6500
    3423
    35 
    36 #define W65BADMAG(x) (((x).f_magic!=W65MAGIC))
    37 
    38 #define FILHDR  struct external_filehdr
    39 #define FILHSZ  20
    40 
    41 
    42 /********************** AOUT "OPTIONAL HEADER" **********************/
    43 
    44 
    45 typedef struct
    46 {
    47   char  magic[2];               /* type of file                         */
    48   char  vstamp[2];              /* version stamp                        */
    49   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    50   char  dsize[4];               /* initialized data "  "                */
    51   char  bsize[4];               /* uninitialized data "   "             */
    52   char  entry[4];               /* entry pt.                            */
    53   char  text_start[4];          /* base of text used for this file */
    54   char  data_start[4];          /* base of data used for this file */
    55 }
    56 AOUTHDR;
    57 
    58 
    59 #define AOUTHDRSZ 28
    60 #define AOUTSZ 28
    61 
    62 
    63 
    64 
    65 /********************** SECTION HEADER **********************/
    66 
    67 
    68 struct external_scnhdr {
    69         char            s_name[8];      /* section name                 */
    70         char            s_paddr[4];     /* physical address, aliased s_nlib */
    71         char            s_vaddr[4];     /* virtual address              */
    72         char            s_size[4];      /* section size                 */
    73         char            s_scnptr[4];    /* file ptr to raw data for section */
    74         char            s_relptr[4];    /* file ptr to relocation       */
    75         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    76         char            s_nreloc[2];    /* number of relocation entries */
    77         char            s_nlnno[2];     /* number of line number entries*/
    78         char            s_flags[4];     /* flags                        */
    79 };
    80 
    81 /*
    82  * names of "special" sections
    83  */
    84 #define _TEXT   ".text"
    85 #define _DATA   ".data"
    86 #define _BSS    ".bss"
    87 
    88 
    89 #define SCNHDR  struct external_scnhdr
    90 #define SCNHSZ  40
    91 
    92 
    93 /********************** LINE NUMBERS **********************/
    94 
    95 /* 1 line number entry for every "breakpointable" source line in a section.
    96  * Line numbers are grouped on a per function basis; first entry in a function
    97  * grouping will have l_lnno = 0 and in place of physical address will be the
    98  * symbol table index of the function name.
    99  */
    100 struct external_lineno {
    101         union {
    102                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    103                 char l_paddr[4];        /* (physical) address of line number    */
    104         } l_addr;
    105         char l_lnno[4]; /* line number          */
    106 };
    107 
    108 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
    109 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val,  (bfd_byte *) (ext->l_lnno));
    110 
    111 #define LINENO  struct external_lineno
    112 #define LINESZ  8
    113 
    114 
    115 /********************** SYMBOLS **********************/
    116 
    117 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    118 #define E_FILNMLEN      14      /* # characters in a file name          */
    119 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    120 
    121 struct external_syment
    122 {
    123   union {
    124     char e_name[E_SYMNMLEN];
    125     struct {
    126       char e_zeroes[4];
    127       char e_offset[4];
    128     } e;
    129   } e;
    130   char e_value[4];
    131   char e_scnum[2];
    132   char e_type[2];
    133   char e_sclass[1];
    134   char e_numaux[1];
    135 };
    136 
    137 
    138 
    139 #define N_BTMASK        (017)
    140 #define N_TMASK         (060)
    141 #define N_BTSHFT        (4)
    142 #define N_TSHIFT        (2)
    143  
    144 
    145 union external_auxent {
    146         struct {
    147                 char x_tagndx[4];       /* str, un, or enum tag indx */
    148                 union {
    149                         struct {
    150                             char  x_lnno[2]; /* declaration line number */
    151                             char  x_size[2]; /* str/union/array size */
    152                         } x_lnsz;
    153                         char x_fsize[4];        /* size of function */
    154                 } x_misc;
    155                 union {
    156                         struct {                /* if ISFCN, tag, or .bb */
    157                             char x_lnnoptr[4];  /* ptr to fcn line # */
    158                             char x_endndx[4];   /* entry ndx past block end */
    159                         } x_fcn;
    160                         struct {                /* if ISARY, up to 4 dimen. */
    161                             char x_dimen[E_DIMNUM][2];
    162                         } x_ary;
    163                 } x_fcnary;
    164                 char x_tvndx[2];                /* tv index */
    165         } x_sym;
    166 
    167         union {
    168                 char x_fname[E_FILNMLEN];
    169                 struct {
    170                         char x_zeroes[4];
    171                         char x_offset[4];
    172                 } x_n;
    173         } x_file;
    174 
    175         struct {
    176                 char x_scnlen[4];                       /* section length */
    177                 char x_nreloc[2];       /* # relocation entries */
    178                 char x_nlinno[2];       /* # line numbers */
    179         } x_scn;
    180 
    181         struct {
    182                 char x_tvfill[4];       /* tv fill value */
    183                 char x_tvlen[2];        /* length of .tv */
    184                 char x_tvran[2][2];     /* tv range */
    185         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    186 
    187 
    188 };
    189 
    190 #define SYMENT  struct external_syment
    191 #define SYMESZ  18     
    192 #define AUXENT  union external_auxent
    193 #define AUXESZ  18
    194 
    195 
     24#define W65BADMAG(x) (((x).f_magic != W65MAGIC))
    19625
    19726/********************** RELOCATION DIRECTIVES **********************/
     
    20130   offset - eg the strange jump and high page addressing modes */
    20231
    203 struct external_reloc {
     32struct external_reloc
     33{
    20434  char r_vaddr[4];
    20535  char r_symndx[4];
     
    20939};
    21040
    211 
    21241#define RELOC struct external_reloc
    21342#define RELSZ 16
  • branches/GNU/src/binutils/include/coff/we32k.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1616   along with this program; if not, write to the Free Software
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    18 
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
     18#define L_LNNO_SIZE 2
     19#include "coff/external.h"
    3120
    3221/* Bits for f_flags:
    33  *      F_RELFLG        relocation info stripped from file
    34  *      F_EXEC          file is executable (no unresolved external references)
    35  *      F_LNNO          line numbers stripped from file
    36  *      F_LSYMS         local symbols stripped from file
    37  *      F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax)
    38  */
     22        F_RELFLG        relocation info stripped from file
     23        F_EXEC          file is executable (no unresolved external references)
     24        F_LNNO          line numbers stripped from file
     25        F_LSYMS         local symbols stripped from file
     26        F_AR32WR        file has byte ordering of an AR32WR machine (e.g. vax).  */
    3927
    4028#define F_RELFLG        (0x0001)
     
    4937#define MTVMAGIC        0x171   /* we32k with transfer vector */
    5038#define RBOMAGIC        0x172   /* reserved */
    51 #define WE32KBADMAG(x) (((x).f_magic != WE32KMAGIC) \
     39#define WE32KBADMAG(x) (   ((x).f_magic != WE32KMAGIC) \
    5240                        && ((x).f_magic != FBOMAGIC) \
    5341                        && ((x).f_magic != RBOMAGIC) \
    5442                        && ((x).f_magic != MTVMAGIC))
    5543
    56 #define FILHDR  struct external_filehdr
    57 #define FILHSZ  20
    58 
    59 
    60 /********************** AOUT "OPTIONAL HEADER" **********************/
    61 
    62 
    63 typedef struct
    64 {
    65   char  magic[2];               /* type of file                         */
    66   char  vstamp[2];              /* version stamp                        */
    67   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    68   char  dsize[4];               /* initialized data "  "                */
    69   char  bsize[4];               /* uninitialized data "   "             */
    70   char  entry[4];               /* entry pt.                            */
    71   char  text_start[4];          /* base of text used for this file */
    72   char  data_start[4];          /* base of data used for this file */
    73 }
    74 AOUTHDR;
    75 
    76 #define AOUTSZ 28
    77 #define AOUTHDRSZ 28
    78 
    79 /********************** SECTION HEADER **********************/
    80 
    81 
    82 struct external_scnhdr {
    83         char            s_name[8];      /* section name                 */
    84         char            s_paddr[4];     /* physical address, aliased s_nlib */
    85         char            s_vaddr[4];     /* virtual address              */
    86         char            s_size[4];      /* section size                 */
    87         char            s_scnptr[4];    /* file ptr to raw data for section */
    88         char            s_relptr[4];    /* file ptr to relocation       */
    89         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    90         char            s_nreloc[2];    /* number of relocation entries */
    91         char            s_nlnno[2];     /* number of line number entries*/
    92         char            s_flags[4];     /* flags                        */
    93 };
    94 
    95 #define SCNHDR  struct external_scnhdr
    96 #define SCNHSZ  40
    97 
    98 /*
    99  * names of "special" sections
    100  */
    101 #define _TEXT   ".text"
    102 #define _DATA   ".data"
    103 #define _BSS    ".bss"
     44/* More names of "special" sections.  */
    10445#define _TV     ".tv"
    10546#define _INIT   ".init"
    10647#define _FINI   ".fini"
    10748
    108 /********************** LINE NUMBERS **********************/
    109 
    110 /* 1 line number entry for every "breakpointable" source line in a section.
    111  * Line numbers are grouped on a per function basis; first entry in a function
    112  * grouping will have l_lnno = 0 and in place of physical address will be the
    113  * symbol table index of the function name.
    114  */
    115 struct external_lineno {
    116         union {
    117                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    118                 char l_paddr[4];        /* (physical) address of line number    */
    119         } l_addr;
    120         char l_lnno[2]; /* line number          */
    121 };
    122 
    123 
    124 #define LINENO  struct external_lineno
    125 #define LINESZ  6
    126 
    127 
    128 /********************** SYMBOLS **********************/
    129 
    130 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    131 #define E_FILNMLEN      14      /* # characters in a file name          */
    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 N_BTMASK        (0xf)
    151 #define N_TMASK         (0x30)
    152 #define N_BTSHFT        (4)
    153 #define N_TSHIFT        (2)
    154  
    155 union external_auxent {
    156         struct {
    157                 char x_tagndx[4];       /* str, un, or enum tag indx */
    158                 union {
    159                         struct {
    160                             char  x_lnno[2]; /* declaration line number */
    161                             char  x_size[2]; /* str/union/array size */
    162                         } x_lnsz;
    163                         char x_fsize[4];        /* size of function */
    164                 } x_misc;
    165                 union {
    166                         struct {                /* if ISFCN, tag, or .bb */
    167                             char x_lnnoptr[4];  /* ptr to fcn line # */
    168                             char x_endndx[4];   /* entry ndx past block end */
    169                         } x_fcn;
    170                         struct {                /* if ISARY, up to 4 dimen. */
    171                             char x_dimen[E_DIMNUM][2];
    172                         } x_ary;
    173                 } x_fcnary;
    174                 char x_tvndx[2];                /* tv index */
    175         } x_sym;
    176 
    177         union {
    178                 char x_fname[E_FILNMLEN];
    179                 struct {
    180                         char x_zeroes[4];
    181                         char x_offset[4];
    182                 } x_n;
    183         } x_file;
    184 
    185         struct {
    186                 char x_scnlen[4];                       /* section length */
    187                 char x_nreloc[2];       /* # relocation entries */
    188                 char x_nlinno[2];       /* # line numbers */
    189         } x_scn;
    190 
    191         struct {
    192                 char x_tvfill[4];       /* tv fill value */
    193                 char x_tvlen[2];        /* length of .tv */
    194                 char x_tvran[2][2];     /* tv range */
    195         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    196 
    197 
    198 };
    199 
    200 #define SYMENT  struct external_syment
    201 #define SYMESZ  18     
    202 #define AUXENT  union external_auxent
    203 #define AUXESZ  18
    204 
    205 
    206 #       define _ETEXT   "etext"
    207 
    208 
    20949/********************** RELOCATION DIRECTIVES **********************/
    21050
    211 
    212 
    213 struct external_reloc {
     51struct external_reloc
     52{
    21453  char r_vaddr[4];
    21554  char r_symndx[4];
     
    21756};
    21857
    219 
    22058#define RELOC struct external_reloc
    22159#define RELSZ 10
  • branches/GNU/src/binutils/include/coff/z8k.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1717   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    1818
    19 /********************** FILE HEADER **********************/
    20 
    21 struct external_filehdr {
    22         char f_magic[2];        /* magic number                 */
    23         char f_nscns[2];        /* number of sections           */
    24         char f_timdat[4];       /* time & date stamp            */
    25         char f_symptr[4];       /* file pointer to symtab       */
    26         char f_nsyms[4];        /* number of symtab entries     */
    27         char f_opthdr[2];       /* sizeof(optional hdr)         */
    28         char f_flags[2];        /* flags                        */
    29 };
    30 
     19#define L_LNNO_SIZE 4
     20#include "coff/external.h"
    3121
    3222/* Type of cpu is stored in flags */
     
    3525#define F_MACHMASK 0xf000
    3626
    37 #define Z8KMAGIC        0x8000
     27#define Z8KMAGIC   0x8000
    3828
    39 #define Z8KBADMAG(x) (((x).f_magic!=Z8KMAGIC))
    40 
    41 #define FILHDR  struct external_filehdr
    42 #define FILHSZ  20
    43 
    44 
    45 /********************** AOUT "OPTIONAL HEADER" **********************/
    46 
    47 
    48 typedef struct
    49 {
    50   char  magic[2];               /* type of file                         */
    51   char  vstamp[2];              /* version stamp                        */
    52   char  tsize[4];               /* text size in bytes, padded to FW bdry*/
    53   char  dsize[4];               /* initialized data "  "                */
    54   char  bsize[4];               /* uninitialized data "   "             */
    55   char  entry[4];               /* entry pt.                            */
    56   char  text_start[4];          /* base of text used for this file */
    57   char  data_start[4];          /* base of data used for this file */
    58 }
    59 AOUTHDR;
    60 
    61 
    62 #define AOUTHDRSZ 28
    63 #define AOUTSZ 28
    64 
    65 
    66 
    67 
    68 /********************** SECTION HEADER **********************/
    69 
    70 
    71 struct external_scnhdr {
    72         char            s_name[8];      /* section name                 */
    73         char            s_paddr[4];     /* physical address, aliased s_nlib */
    74         char            s_vaddr[4];     /* virtual address              */
    75         char            s_size[4];      /* section size                 */
    76         char            s_scnptr[4];    /* file ptr to raw data for section */
    77         char            s_relptr[4];    /* file ptr to relocation       */
    78         char            s_lnnoptr[4];   /* file ptr to line numbers     */
    79         char            s_nreloc[2];    /* number of relocation entries */
    80         char            s_nlnno[2];     /* number of line number entries*/
    81         char            s_flags[4];     /* flags                        */
    82 };
    83 
    84 /*
    85  * names of "special" sections
    86  */
    87 #define _TEXT   ".text"
    88 #define _DATA   ".data"
    89 #define _BSS    ".bss"
    90 
    91 
    92 #define SCNHDR  struct external_scnhdr
    93 #define SCNHSZ  40
    94 
    95 
    96 /********************** LINE NUMBERS **********************/
    97 
    98 /* 1 line number entry for every "breakpointable" source line in a section.
    99  * Line numbers are grouped on a per function basis; first entry in a function
    100  * grouping will have l_lnno = 0 and in place of physical address will be the
    101  * symbol table index of the function name.
    102  */
    103 struct external_lineno {
    104         union {
    105                 char l_symndx[4];       /* function name symbol index, iff l_lnno == 0*/
    106                 char l_paddr[4];        /* (physical) address of line number    */
    107         } l_addr;
    108         char l_lnno[4]; /* line number          */
    109 };
    110 
    111 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) (ext->l_lnno));
    112 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_32(abfd,val,  (bfd_byte *) (ext->l_lnno));
    113 
    114 #define LINENO  struct external_lineno
    115 #define LINESZ  8
    116 
    117 
    118 /********************** SYMBOLS **********************/
    119 
    120 #define E_SYMNMLEN      8       /* # characters in a symbol name        */
    121 #define E_FILNMLEN      14      /* # characters in a file name          */
    122 #define E_DIMNUM        4       /* # array dimensions in auxiliary entry */
    123 
    124 struct external_syment
    125 {
    126   union {
    127     char e_name[E_SYMNMLEN];
    128     struct {
    129       char e_zeroes[4];
    130       char e_offset[4];
    131     } e;
    132   } e;
    133   char e_value[4];
    134   char e_scnum[2];
    135   char e_type[2];
    136   char e_sclass[1];
    137   char e_numaux[1];
    138 };
    139 
    140 
    141 
    142 #define N_BTMASK        (017)
    143 #define N_TMASK         (060)
    144 #define N_BTSHFT        (4)
    145 #define N_TSHIFT        (2)
     29#define Z8KBADMAG(x) (((x).f_magic != Z8KMAGIC))
    14630 
    147 
    148 union external_auxent {
    149         struct {
    150                 char x_tagndx[4];       /* str, un, or enum tag indx */
    151                 union {
    152                         struct {
    153                             char  x_lnno[2]; /* declaration line number */
    154                             char  x_size[2]; /* str/union/array size */
    155                         } x_lnsz;
    156                         char x_fsize[4];        /* size of function */
    157                 } x_misc;
    158                 union {
    159                         struct {                /* if ISFCN, tag, or .bb */
    160                             char x_lnnoptr[4];  /* ptr to fcn line # */
    161                             char x_endndx[4];   /* entry ndx past block end */
    162                         } x_fcn;
    163                         struct {                /* if ISARY, up to 4 dimen. */
    164                             char x_dimen[E_DIMNUM][2];
    165                         } x_ary;
    166                 } x_fcnary;
    167                 char x_tvndx[2];                /* tv index */
    168         } x_sym;
    169 
    170         union {
    171                 char x_fname[E_FILNMLEN];
    172                 struct {
    173                         char x_zeroes[4];
    174                         char x_offset[4];
    175                 } x_n;
    176         } x_file;
    177 
    178         struct {
    179                 char x_scnlen[4];                       /* section length */
    180                 char x_nreloc[2];       /* # relocation entries */
    181                 char x_nlinno[2];       /* # line numbers */
    182         } x_scn;
    183 
    184         struct {
    185                 char x_tvfill[4];       /* tv fill value */
    186                 char x_tvlen[2];        /* length of .tv */
    187                 char x_tvran[2][2];     /* tv range */
    188         } x_tv;         /* info about .tv section (in auxent of symbol .tv)) */
    189 
    190 
    191 };
    192 
    193 #define SYMENT  struct external_syment
    194 #define SYMESZ  18     
    195 #define AUXENT  union external_auxent
    196 #define AUXESZ  18
    197 
    198 
    199 
    20031/********************** RELOCATION DIRECTIVES **********************/
    20132
    20233/* The external reloc has an offset field, because some of the reloc
    20334   types on the z8k don't have room in the instruction for the entire
    204    offset - eg with segments */
     35   offset - eg with segments. */
    20536
    206 struct external_reloc {
     37struct external_reloc
     38{
    20739  char r_vaddr[4];
    20840  char r_symndx[4];
     
    21244};
    21345
    214 
    21546#define RELOC struct external_reloc
    21647#define RELSZ 16
Note: See TracChangeset for help on using the changeset viewer.