Changeset 609 for branches/GNU/src/binutils/include/coff/tic30.h
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/include/coff/tic30.h
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r608 r609 17 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 18 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 19 #define L_LNNO_SIZE 4 20 #include "coff/external.h" 31 21 32 22 #define TIC30MAGIC 0xC000 33 23 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)) 194 25 195 26 /********************** RELOCATION DIRECTIVES **********************/ … … 199 30 offset - eg with segments */ 200 31 201 struct external_reloc { 32 struct external_reloc 33 { 202 34 char r_vaddr[4]; 203 35 char r_symndx[4]; … … 206 38 char r_stuff[2]; 207 39 }; 208 209 40 210 41 #define RELOC struct external_reloc -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
