Changeset 609 for branches/GNU/src/binutils/include/coff
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- 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
to1.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> 1 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com> 2 3 * coff/h8300.h (H8300HNMAGIC, H8300SNMAGIC): New. 4 (H8300HNBADMAG, H8300SNBADMAG): New. 5 6 2003-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 12 2003-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 19 2002-11-30 Alan Modra <amodra@bigpond.net.au> 20 21 * ecoff.h: Replace boolean with bfd_boolean. 22 * xcoff.h: Likewise. 23 24 2002-03-18 Tom Rix <trix@redhat.com> 25 26 * rs6k64.h: Add U64_TOCMAGIC, AIX 5 64 bit magic number. 27 28 2002-02-01 Tom Rix <trix@redhat.com> 29 30 * xcoff.h: Conditionally support <aiaff> for pre AIX 4.3. 31 32 2002-01-31 Ivan Guzvinec <ivang@opencores.org> 33 34 * or32.h: New file. 35 36 2001-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 43 2001-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 48 2001-12-16 Tom Rix <trix@redhat.com> 49 50 * xcoff.h : Clean up formatting. 51 52 2002-01-15 Richard Earnshaw <rearnsha@arm.com> 53 54 * arm.h (F_VFP_FLOAT): Define. 55 56 2001-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 63 2001-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 68 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com> 69 70 * ti.h (GET_SCNHDR_PAGE): Fix compile time warning. 71 72 2001-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 83 2001-09-05 Tom Rix <trix@redhat.com> 84 85 * xcoff.h : Add XCOFF_SYSCALL32 and XCOFF_SYSCALL64 hash table flags. 86 87 2001-08-27 Andreas Jaeger <aj@suse.de> 88 89 * xcoff.h (struct __rtinit): Make proper prototype for rtl. 90 91 Fri 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 95 2001-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 103 2001-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 109 2001-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 138 2001-02-09 David Mosberger <davidm@hpl.hp.com> 139 5 140 * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ. 6 141 Rename from PEPAOUTHDR. 7 142 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> 143 2001-01-23 H.J. Lu <hjl@gnu.org> 144 15 145 * pe.h (struct external_PEI_DOS_hdr): New. 16 146 (struct external_PEI_IMAGE_hdr): New. -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/a29k.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 23 23 #endif 24 24 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" 46 27 47 28 /* … … 53 34 #define SIPRBOMAGIC 0573 /* Am29000 (Byte 0 is LSB) */ 54 35 55 56 36 #define A29K_MAGIC_BIG SIPFBOMAGIC 57 37 #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)) 60 40 61 41 #define OMAGIC A29K_MAGIC_BIG … … 71 51 /*--------------------------------------------------------------*/ 72 52 73 /*74 ** Optional (a.out) header75 */76 77 typedef struct external_aouthdr78 {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 2890 #define AOUTHDRSZ 2891 53 92 54 /* aouthdr magic numbers */ … … 94 56 #define SHMAGIC 0406 /* NYU/Ultra3 shared data executable 95 57 (writable text) */ 96 58 #undef _ETEXT 97 59 #define _ETEXT "_etext" 98 60 99 61 /*--------------------------------------------------------------*/ 100 62 101 /*102 ** Section header and related definitions103 */104 63 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. */ 128 65 #define _LIT ".lit" 129 66 … … 151 88 */ 152 89 153 struct external_reloc { 90 struct external_reloc 91 { 154 92 char r_vaddr[4]; /* (virtual) address of reference */ 155 93 char r_symndx[4]; /* index into symbol table */ … … 200 138 /*--------------------------------------------------------------*/ 201 139 202 /*203 ** Line number entry declaration and related definitions204 */205 206 struct external_lineno207 {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_lineno216 #define LINESZ 6 /* sizeof (LINENO) */217 218 /*--------------------------------------------------------------*/219 220 /*221 ** Symbol entry declaration and related definitions222 */223 224 #define E_SYMNMLEN 8 /* Number of characters in a symbol name */225 226 struct external_syment227 {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_syment243 #define SYMESZ 18244 245 140 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ 246 141 … … 252 147 #define C_EXTREG 20 /* external global register */ 253 148 #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 related271 ** 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_auxent321 #define AUXESZ 18 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/alpha.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 20 20 /********************** FILE HEADER **********************/ 21 21 22 struct external_filehdr { 22 struct external_filehdr 23 { 23 24 unsigned char f_magic[2]; /* magic number */ 24 25 unsigned char f_nscns[2]; /* number of sections */ … … 44 45 45 46 /********************** AOUT "OPTIONAL HEADER" **********************/ 46 47 47 48 48 typedef struct external_aouthdr … … 71 71 /********************** SECTION HEADER **********************/ 72 72 73 struct external_scnhdr { 73 struct external_scnhdr 74 { 74 75 unsigned char s_name[8]; /* section name */ 75 76 unsigned char s_paddr[8]; /* physical address, aliased s_nlib */ … … 89 90 /********************** RELOCATION DIRECTIVES **********************/ 90 91 91 struct external_reloc { 92 struct external_reloc 93 { 92 94 unsigned char r_vaddr[8]; 93 95 unsigned char r_symndx[4]; … … 167 169 /* File header as a set of bytes */ 168 170 169 struct hdr_ext { 171 struct hdr_ext 172 { 170 173 unsigned char h_magic[2]; 171 174 unsigned char h_vstamp[2]; … … 197 200 /* File descriptor external record */ 198 201 199 struct fdr_ext { 202 struct fdr_ext 203 { 200 204 unsigned char f_adr[8]; 201 205 unsigned char f_cbLineOffset[8]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/apollo.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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 DO_NOT_DEFINE_AOUTHDR 20 #define L_LNNO_SIZE 2 21 #include "coff/external.h" 31 22 32 23 /* Motorola 68000/68008/68010/68020 */ … … 48 39 ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) && \ 49 40 ((x).f_magic!=APOLLOM68KMAGIC) ) 50 51 52 #define FILHDR struct external_filehdr53 #define FILHSZ 2054 55 41 56 42 /********************** AOUT "OPTIONAL HEADER" **********************/ … … 76 62 #define AOUTSZ 44 77 63 64 /* Apollo allowa for larger section names by allowing 65 them to be in the string table. */ 78 66 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. */ 101 69 102 70 #define s_zeroes section_name.s_name 103 71 #define s_offset (section_name.s_name+4) 104 72 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. */ 111 74 #define _TV ".tv" 112 75 #define _INIT ".init" … … 123 86 #define _UNWIND ".unwind" /* Stack unwind information */ 124 87 125 #define SCNHDR struct external_scnhdr126 #define SCNHSZ 40127 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 function133 * grouping will have l_lnno = 0 and in place of physical address will be the134 * 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_lineno146 #define LINESZ 6147 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_syment156 {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_syment225 #define SYMESZ 18226 #define AUXENT union external_auxent227 #define AUXESZ 18228 229 230 231 88 /********************** RELOCATION DIRECTIVES **********************/ 232 89 233 234 struct external_reloc{90 struct external_reloc 91 { 235 92 char r_vaddr[4]; 236 93 char r_symndx[4]; … … 241 98 242 99 }; 243 244 100 245 101 #define RELOC struct external_reloc -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/arm.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* ARM COFF support for BFD. 2 Copyright 1998, 1999, 2000 Free Software Foundation, Inc.2 Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc. 3 3 4 4 This file is part of BFD, the Binary File Descriptor library. … … 20 20 #define COFFARM 1 21 21 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" 34 25 35 26 /* 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. */ 49 39 50 40 #define F_RELFLG (0x0001) … … 61 51 #define F_APCS_SET (0x0800) 62 52 #define F_SOFT_FLOAT (0x2000) 53 #define F_VFP_FLOAT (0x4000) 63 54 64 55 /* Bits stored in flags field of the internal_f structure */ … … 78 69 79 70 /* 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. */ 87 77 88 78 #define ARMMAGIC 0xa00 /* I just made this up */ … … 96 86 #define ARMBADMAG(x) (((x).f_magic != ARMMAGIC) && ((x).f_magic != ARMPEMAGIC) && ((x).f_magic != THUMBPEMAGIC)) 97 87 98 #define FILHDR struct external_filehdr99 #define FILHSZ 20100 101 102 /********************** AOUT "OPTIONAL HEADER" **********************/103 104 105 typedef struct106 {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 28120 #define AOUTHDRSZ 28121 122 88 #define OMAGIC 0404 /* object files, eg as output */ 123 89 #define ZMAGIC 0413 /* demand load format, eg normal ld output */ 124 90 #define STMAGIC 0401 /* target shlib */ 125 91 #define SHMAGIC 0443 /* host shlib */ 126 127 92 128 93 /* define some NT default values */ … … 133 98 #define NT_DEF_COMMIT 0x1000 134 99 135 /********************** SECTION HEADER **********************/136 struct external_scnhdr137 {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_scnhdr151 #define SCNHSZ 40152 153 /*154 * names of "special" sections155 */156 #define _TEXT ".text"157 #define _DATA ".data"158 #define _BSS ".bss"159 #define _COMMENT ".comment"160 #define _LIB ".lib"161 162 100 /* We use the .rdata section to hold read only data. */ 163 101 #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 function169 * grouping will have l_lnno = 0 and in place of physical address will be the170 * symbol table index of the function name.171 */172 struct external_lineno173 {174 union175 {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_lineno184 #define LINESZ 6185 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_syment194 {195 union196 {197 char e_name[E_SYMNMLEN];198 struct199 {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_auxent217 {218 struct219 {220 char x_tagndx[4]; /* str, un, or enum tag indx */221 union222 {223 struct224 {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 union231 {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 union246 {247 char x_fname[E_FILNMLEN];248 struct249 {250 char x_zeroes[4];251 char x_offset[4];252 } x_n;253 } x_file;254 255 struct256 {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 struct266 {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_syment274 #define SYMESZ 18275 #define AUXENT union external_auxent276 #define AUXESZ 18277 278 #define _ETEXT "etext"279 102 280 103 /********************** RELOCATION DIRECTIVES **********************/ … … 302 125 #define RELSZ 14 303 126 #endif 127 128 #define ARM_NOTE_SECTION ".note" -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/ecoff.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 3 3 symconst.h. 4 4 5 Copyright 2001 Free Software Foundation, Inc.5 Copyright 2001, 2002 Free Software Foundation, Inc. 6 6 7 7 This program is free software; you can redistribute it and/or modify … … 9 9 the Free Software Foundation; either version 2 of the License, or 10 10 (at your option) any later version. 11 11 12 12 This program is distributed in the hope that it will be useful, 13 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 15 GNU General Public License for more details. 16 16 17 17 You should have received a copy of the GNU General Public License 18 18 along with this program; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 20 20 21 21 #ifndef ECOFF_H 22 22 #define ECOFF_H … … 431 431 ecoff_debug_info structure. The section argument is used for 432 432 ELF, not straight ECOFF. */ 433 b oolean (*read_debug_info) PARAMS ((bfd *, asection *,434 433 bfd_boolean (*read_debug_info) 434 PARAMS ((bfd *, asection *, struct ecoff_debug_info *)); 435 435 }; 436 436 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/go32exe.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 19 19 #define STUBSIZE 2048 20 20 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 }; 21 struct 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 }; 32 33 33 34 #undef FILHDR -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/h8300.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 /* coff information for HitachiH8/300 and H8/300-H1 /* coff information for Renesas H8/300 and H8/300-H 2 2 3 Copyright 2001 Free Software Foundation, Inc.3 Copyright 2001, 2003 Free Software Foundation, Inc. 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 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 31 19 #define L_LNNO_SIZE 4 20 #include "coff/external.h" 32 21 33 22 #define H8300MAGIC 0x8300 34 23 #define H8300HMAGIC 0x8301 35 24 #define H8300SMAGIC 0x8302 25 #define H8300HNMAGIC 0x8303 26 #define H8300SNMAGIC 0x8304 36 27 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)) 40 33 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. */ 201 35 202 36 /* The external reloc has an offset field, because some of the reloc 203 37 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. */ 205 39 206 struct external_reloc { 40 struct external_reloc 41 { 207 42 char r_vaddr[4]; 208 43 char r_symndx[4]; … … 212 47 }; 213 48 214 215 49 #define RELOC struct external_reloc 216 50 #define RELSZ 16 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/h8500.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 /* coff information for HitachiH8/5001 /* coff information for Renesas H8/500 2 2 3 Copyright 2001 Free Software Foundation, Inc.3 Copyright 2001, 2003 Free Software Foundation, Inc. 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 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 31 19 #define L_LNNO_SIZE 4 20 #include "coff/external.h" 32 21 33 22 #define H8500MAGIC 0x8500 34 23 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)) 196 25 197 26 /********************** RELOCATION DIRECTIVES **********************/ … … 199 28 /* The external reloc has an offset field, because some of the reloc 200 29 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. */ 202 31 203 struct external_reloc { 32 struct external_reloc 33 { 204 34 char r_vaddr[4]; 205 35 char r_symndx[4]; … … 209 39 }; 210 40 211 212 41 #define RELOC struct external_reloc 213 42 #define RELSZ 16 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/i386.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 17 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 18 18 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" 31 22 32 23 /* 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). */ 39 29 40 30 #define F_RELFLG (0x0001) … … 42 32 #define F_LNNO (0x0004) 43 33 #define F_LSYMS (0x0008) 44 45 46 34 47 35 #define I386MAGIC 0x14c … … 53 41 #define LYNXCOFFMAGIC 0415 54 42 55 #define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \43 #define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \ 56 44 && (x).f_magic != I386AIXMAGIC \ 57 45 && (x).f_magic != I386PTXMAGIC \ 58 46 && (x).f_magic != LYNXCOFFMAGIC) 59 60 #define FILHDR struct external_filehdr61 #define FILHSZ 2062 63 64 /********************** AOUT "OPTIONAL HEADER" **********************/65 66 67 typedef struct68 {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 2884 #define AOUTHDRSZ 2885 47 86 48 #define OMAGIC 0404 /* object files, eg as output */ … … 88 50 #define STMAGIC 0401 /* target shlib */ 89 51 #define SHMAGIC 0443 /* host shlib */ 90 91 52 92 53 /* define some NT default values */ … … 97 58 #define NT_DEF_COMMIT 0x1000 98 59 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_scnhdr116 #define SCNHSZ 40117 118 /*119 * names of "special" sections120 */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 function131 * grouping will have l_lnno = 0 and in place of physical address will be the132 * 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_lineno144 #define LINESZ 6145 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_syment154 {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_syment223 #define SYMESZ 18224 #define AUXENT union external_auxent225 #define AUXESZ 18226 227 228 # define _ETEXT "etext"229 230 231 60 /********************** RELOCATION DIRECTIVES **********************/ 232 61 233 234 235 struct external_reloc { 62 struct external_reloc 63 { 236 64 char r_vaddr[4]; 237 65 char r_symndx[4]; … … 239 67 }; 240 68 241 242 69 #define RELOC struct external_reloc 243 70 #define RELSZ 10 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/i860.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 17 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 18 18 19 /* ********************* FILE HEADER **********************/19 /* This file was hacked from i386.h [dolan@ssd.intel.com] */ 20 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 21 #define L_LNNO_SIZE 2 22 #include "coff/external.h" 31 23 32 24 /* 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). */ 39 30 40 31 #define F_RELFLG (0x0001) … … 43 34 #define F_LSYMS (0x0008) 44 35 45 46 47 36 #define I860MAGIC 0x14d 48 37 49 38 #define I860BADMAG(x) ((x).f_magic != I860MAGIC) 50 39 51 #define FILHDR struct external_filehdr52 #define FILHSZ 2053 54 55 /********************** AOUT "OPTIONAL HEADER" **********************/56 57 58 typedef struct59 {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 2873 #define AOUTHDRSZ 2874 75 40 /* FIXME: What are the a.out magic numbers? */ 76 41 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" 205 43 206 44 /********************** RELOCATION DIRECTIVES **********************/ 207 45 208 209 210 struct external_reloc { 46 struct external_reloc 47 { 211 48 char r_vaddr[4]; 212 49 char r_symndx[4]; … … 214 51 }; 215 52 216 217 53 #define RELOC struct external_reloc 218 54 #define RELSZ 10 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/i960.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 21 21 /********************** FILE HEADER **********************/ 22 22 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 */ 23 struct 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 */ 31 32 }; 32 33 … … 66 67 /********************** AOUT "OPTIONAL HEADER" **********************/ 67 68 68 typedef struct { 69 unsigned long phys_addr; 70 unsigned long bitarray; 69 typedef struct 70 { 71 unsigned long phys_addr; 72 unsigned long bitarray; 71 73 } TAGBITS; 72 73 74 74 75 75 typedef struct … … 100 100 /********************** SECTION HEADER **********************/ 101 101 102 103 struct external_scnhdr{104 105 106 107 108 109 110 111 112 113 114 102 struct 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 */ 115 115 }; 116 116 … … 133 133 * symbol table index of the function name. 134 134 */ 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 */ 135 struct 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 */ 142 145 }; 143 146 … … 145 148 #define LINENO struct external_lineno 146 149 #define LINESZ 8 147 148 150 149 151 /********************** SYMBOLS **********************/ … … 155 157 struct external_syment 156 158 { 157 union { 159 union 160 { 158 161 char e_name[E_SYMNMLEN]; 159 struct { 162 163 struct 164 { 160 165 char e_zeroes[4]; 161 166 char e_offset[4]; 162 167 } e; 163 168 } e; 169 164 170 char e_value[4]; 165 171 char e_scnum[2]; … … 171 177 }; 172 178 173 174 175 176 179 #define N_BTMASK (0x1f) 177 180 #define N_TMASK (0x60) … … 179 182 #define N_TSHIFT (2) 180 183 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. */ 184 union 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. */ 228 255 #define x_stdindx x_stindx 229 230 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 }; 244 271 245 272 #define SYMENT struct external_syment … … 252 279 /********************** RELOCATION DIRECTIVES **********************/ 253 280 254 struct external_reloc { 281 struct external_reloc 282 { 255 283 char r_vaddr[4]; 256 284 char r_symndx[4]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/ia64.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 17 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 18 18 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" 31 23 32 24 #define IA64MAGIC 0x200 … … 47 39 #define F_LSYMS (0x0008) 48 40 49 50 #define FILHDR struct external_filehdr51 #define FILHSZ 2052 53 54 41 /********************** AOUT "OPTIONAL HEADER" **********************/ 55 56 57 42 typedef struct 58 43 { … … 83 68 #define SHMAGIC 0443 /* host shlib */ 84 69 85 86 70 /* define some NT default values */ 87 71 /* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ … … 91 75 #define NT_DEF_COMMIT 0x1000 92 76 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_scnhdr110 #define SCNHSZ 40111 112 /*113 * names of "special" sections114 */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 function125 * grouping will have l_lnno = 0 and in place of physical address will be the126 * 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_lineno138 #define LINESZ 6139 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_syment148 {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_syment217 #define SYMESZ 18218 #define AUXENT union external_auxent219 #define AUXESZ 18220 221 222 # define _ETEXT "etext"223 224 225 77 /********************** RELOCATION DIRECTIVES **********************/ 226 78 227 228 229 struct external_reloc { 79 struct external_reloc 80 { 230 81 char r_vaddr[4]; 231 82 char r_symndx[4]; … … 233 84 }; 234 85 235 236 86 #define RELOC struct external_reloc 237 87 #define RELSZ 10 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/internal.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 62 62 struct internal_extra_pe_filehdr pe; 63 63 64 /* standard coff internal info*/64 /* Standard coff internal info. */ 65 65 unsigned short f_magic; /* magic number */ 66 66 unsigned short f_nscns; /* number of sections */ … … 75 75 76 76 /* 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. */ 88 87 89 88 #define F_RELFLG (0x0001) … … 98 97 #define F_DLL (0x2000) 99 98 100 /* extra structure which is used in the optional header*/99 /* Extra structure which is used in the optional header. */ 101 100 typedef struct _IMAGE_DATA_DIRECTORY 102 101 { … … 175 174 176 175 /* RS/6000 stuff */ 177 unsigned longo_toc; /* address of TOC */176 bfd_vma o_toc; /* address of TOC */ 178 177 short o_snentry; /* section number for entry point */ 179 178 short o_sntext; /* section number for text */ … … 186 185 short o_modtype; /* Module type field, 1R,RE,RO */ 187 186 short o_cputype; /* Encoded CPU type */ 188 unsigned longo_maxstack; /* max stack size allowed. */189 unsigned longo_maxdata; /* max data size allowed. */187 bfd_vma o_maxstack; /* max stack size allowed. */ 188 bfd_vma o_maxdata; /* max data size allowed. */ 190 189 191 190 /* ECOFF stuff */ … … 201 200 long vid[2]; /* Version id */ 202 201 203 204 202 struct internal_extra_pe_aouthdr pe; 205 206 203 }; 207 204 … … 323 320 }; 324 321 325 /* 326 * s_flags "type" 327 */ 322 /* s_flags "type". */ 328 323 #define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */ 329 324 #define STYP_DSECT (0x0001) /* "dummy": relocated only*/ … … 344 339 #define STYP_LIB (0x0800) /* for .lib: same as INFO */ 345 340 #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 a347 348 word of contiguous bytes349 beginning on a wordboundary. */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. */ 350 345 351 346 #define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */ 352 347 353 348 354 355 349 /********************** LINE NUMBERS **********************/ 356 350 357 351 /* 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. */ 362 355 363 356 struct internal_lineno … … 365 358 union 366 359 { 367 longl_symndx; /* function name symbol index, iff l_lnno == 0*/368 longl_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 */ 369 362 } l_addr; 370 363 unsigned long l_lnno; /* line number */ … … 389 382 char *_n_nptr[2]; /* allows for overlaying */ 390 383 } _n; 391 longn_value; /* value of symbol */384 bfd_vma n_value; /* value of symbol */ 392 385 short n_scnum; /* section number */ 393 386 unsigned short n_flags; /* copy of flags from filhdr */ … … 401 394 #define n_offset _n._n_n._n_offset 402 395 403 404 396 /* Relocatable symbols have number of the section in which they are defined, 405 or one of the following: */397 or one of the following: */ 406 398 407 399 #define N_UNDEF ((short)0) /* undefined symbol */ … … 411 403 #define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/ 412 404 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 416 407 #define T_NULL 0 417 408 #define T_VOID 1 /* function argument (only used by compiler) */ … … 432 423 #define T_LNGDBL 16 /* long double */ 433 424 434 /* 435 * derived types, in n_type 436 */ 425 /* Derived types, in n_type. */ 426 437 427 #define DT_NON (0) /* no derived type */ 438 428 #define DT_PTR (1) /* pointer */ … … 479 469 struct 480 470 { /* if ISFCN, tag, or .bb */ 481 longx_lnnoptr; /* ptr to fcn line # */471 bfd_signed_vma x_lnnoptr; /* ptr to fcn line # */ 482 472 union 483 473 { /* entry ndx past block end */ … … 530 520 union 531 521 { /* csect length or enclosing csect */ 532 longl;522 bfd_signed_vma l; 533 523 struct coff_ptr_struct *p; 534 524 } x_scnlen; … … 611 601 612 602 #define R_DIR16 1 603 #define R_REL24 5 613 604 #define R_DIR32 6 614 605 #define R_IMAGEBASE 7 … … 619 610 #define R_PCRWORD 19 620 611 #define R_PCRLONG 20 612 #define R_PCR24 21 621 613 #define R_IPRSHORT 24 622 614 #define R_IPRLONG 26 … … 625 617 #define R_TAGWORD 31 626 618 #define R_JUMPTARG 32 /* strange 29k 00xx00xx reloc */ 619 #define R_PARTLS16 32 620 #define R_PARTMS8 33 627 621 628 622 #define R_PCR16L 128 … … 650 644 651 645 /* This reloc identifies a bra with an 8-bit pc-relative 652 target that was formerl ly a jmp insn with a 16bit target. */646 target that was formerly a jmp insn with a 16bit target. */ 653 647 #define R_JMP2 0x44 654 648 … … 662 656 663 657 /* This reloc identifies a bra with an 8-bit pc-relative 664 target that was formerl ly a jmp insn with a 24bit target. */658 target that was formerly a jmp insn with a 24bit target. */ 665 659 #define R_JMPL2 0x47 666 660 … … 690 684 #define R_MOVL1 0x4c 691 685 692 /* This reloc identifies mov.[wl] insns which formerl ly had686 /* This reloc identifies mov.[wl] insns which formerly had 693 687 a 32/24bit absolute address and now have a 16bit absolute address. */ 694 688 #define R_MOVL2 0x4d -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/m68k.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 20 20 #define GNU_COFF_M68K_H 1 21 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 22 #define L_LNNO_SIZE 2 23 #include "coff/external.h" 34 24 35 25 /* Motorola 68000/68008/68010/68020 */ … … 42 32 #define M68TVMAGIC 0211 43 33 44 /* this is the magic of the Bull dpx/2 */34 /* This is the magic of the Bull dpx/2 */ 45 35 #define MC68KBCSMAGIC 0526 46 36 … … 53 43 /* This intentionally does not include MC68KBCSMAGIC; it only includes 54 44 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)) 57 53 58 54 /* Magic numbers for the a.out header. */ … … 63 59 #define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */ 64 60 65 #define FILHDR struct external_filehdr66 #define FILHSZ 2067 68 69 /********************** AOUT "OPTIONAL HEADER" **********************/70 71 72 typedef struct73 {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 2886 #define AOUTHDRSZ 2887 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" sections107 */108 #define _TEXT ".text"109 #define _DATA ".data"110 #define _BSS ".bss"111 #define _COMMENT ".comment"112 113 #define SCNHDR struct external_scnhdr114 #define SCNHSZ 40115 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 function121 * grouping will have l_lnno = 0 and in place of physical address will be the122 * 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_lineno134 #define LINESZ 6135 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_syment144 {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_syment213 #define SYMESZ 18214 #define AUXENT union external_auxent215 #define AUXESZ 18216 217 218 219 61 /********************** RELOCATION DIRECTIVES **********************/ 220 62 221 222 struct external_reloc{63 struct external_reloc 64 { 223 65 char r_vaddr[4]; 224 66 char r_symndx[4]; … … 227 69 char r_offset[4]; 228 70 #endif 229 230 71 }; 231 232 72 233 73 #define RELOC struct external_reloc -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/m88k.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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 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" 29 24 30 25 #define MC88MAGIC 0540 /* 88k BCS executable */ … … 32 27 #define MC88OMAGIC 0555 /* Object file */ 33 28 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)) 35 32 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 */ 44 34 #define PAGEMAGICBCS 0413 45 35 46 47 typedef struct48 {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 2864 #define AOUTHDRSZ 2865 66 67 36 /********************** SECTION HEADER **********************/ 68 69 37 70 38 struct external_scnhdr … … 82 50 }; 83 51 84 85 52 #define SCNHDR struct external_scnhdr 86 53 #define SCNHSZ 44 87 54 88 /* 89 * names of "special" sections 90 */ 55 /* Names of "special" sections. */ 91 56 #define _TEXT ".text" 92 57 #define _DATA ".data" 93 58 #define _BSS ".bss" 94 59 #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 function100 * grouping will have l_lnno = 0 and in place of physical address will be the101 * 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_lineno114 #define LINESZ 8115 60 116 61 … … 123 68 struct external_syment 124 69 { 125 union { 70 union 71 { 126 72 char e_name[E_SYMNMLEN]; 127 struct { 73 74 struct 75 { 128 76 char e_zeroes[4]; 129 77 char e_offset[4]; 130 78 } e; 79 131 80 } e; 81 132 82 char e_value[4]; 133 83 char e_scnum[2]; … … 138 88 }; 139 89 140 141 142 143 90 #define N_BTMASK 017 144 91 #define N_TMASK 060 … … 146 93 #define N_TSHIFT 2 147 94 148 149 95 /* Note that this isn't the same shape as other coffs */ 150 union external_auxent { 151 struct { 96 union external_auxent 97 { 98 struct 99 { 152 100 char x_tagndx[4]; /* str, un, or enum tag indx */ 153 101 /* 4 */ 154 union { 102 103 union 104 { 155 105 char x_fsize[4]; /* size of function */ 156 struct { 106 107 struct 108 { 157 109 char x_lnno[4]; /* declaration line number */ 158 110 char x_size[4]; /* str/union/array size */ 159 111 } x_lnsz; 112 160 113 } x_misc; 161 114 162 115 /* 12 */ 163 union { 164 struct { /* if ISFCN, tag, or .bb */ 116 union 117 { 118 struct /* if ISFCN, tag, or .bb */ 119 { 165 120 char x_lnnoptr[4]; /* ptr to fcn line # */ 166 121 char x_endndx[4]; /* entry ndx past block end */ 167 122 } x_fcn; 168 struct { /* if ISARY, up to 4 dimen. */ 123 124 struct /* if ISARY, up to 4 dimen. */ 125 { 169 126 char x_dimen[E_DIMNUM][2]; 170 127 } x_ary; 128 171 129 } x_fcnary; 172 130 /* 20 */ … … 174 132 } x_sym; 175 133 176 union { 134 union 135 { 177 136 char x_fname[E_FILNMLEN]; 178 struct { 137 138 struct 139 { 179 140 char x_zeroes[4]; 180 141 char x_offset[4]; 181 142 } x_n; 143 182 144 } x_file; 183 145 184 struct { 146 struct 147 { 185 148 char x_scnlen[4]; /* section length */ 186 149 char x_nreloc[4]; /* # relocation entries */ … … 188 151 } x_scn; 189 152 190 struct { 153 struct 154 { 191 155 char x_tvfill[4]; /* tv fill value */ 192 156 char x_tvlen[2]; /* length of .tv */ 193 157 char x_tvran[2][2]; /* tv range */ 194 158 } x_tv; /* info about .tv section (in auxent of symbol .tv)) */ 195 196 159 }; 197 160 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) 216 177 217 178 #define SYMENT struct external_syment … … 220 181 #define AUXESZ 20 221 182 222 223 183 /********************** RELOCATION DIRECTIVES **********************/ 224 184 225 struct external_reloc { 185 struct external_reloc 186 { 226 187 char r_vaddr[4]; 227 188 char r_symndx[4]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/mcore.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 23 23 #define _COFF_MORE_H 24 24 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)) 25 32 26 33 #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ … … 37 44 #define PEMCORE 38 45 39 typedef struct40 {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 2853 #define AOUTHDRSZ 2854 55 46 #define OMAGIC 0404 /* object files, eg as output */ 56 47 #define ZMAGIC 0413 /* demand load format, eg normal ld output */ … … 61 52 #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b 62 53 63 64 54 /* Define some NT default values. */ 65 55 #define NT_SECTION_ALIGNMENT 0x1000 … … 67 57 #define NT_DEF_RESERVE 0x100000 68 58 #define NT_DEF_COMMIT 0x1000 69 70 59 71 60 struct external_reloc … … 80 69 #define RELSZ 14 81 70 82 #define MCOREMAGIC 0xb00 /* I just made this up */83 84 #define MCOREBADMAG(x) (((x).f_magic!= MCOREMAGIC))85 86 struct external_filehdr87 {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_filehdr98 #define FILHSZ 2099 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_syment106 {107 union108 {109 char e_name [E_SYMNMLEN];110 struct111 {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 0xf125 #define N_TMASK 0x30126 #define N_BTSHFT 4127 #define N_TSHIFT 2128 129 union external_auxent130 {131 struct132 {133 char x_tagndx [4]; /* str, un, or enum tag indx */134 135 union136 {137 struct138 {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 union148 {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 union167 {168 char x_fname [E_FILNMLEN];169 170 struct171 {172 char x_zeroes [4];173 char x_offset [4];174 } x_n;175 176 } x_file;177 178 struct179 {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 struct189 {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_syment197 #define SYMESZ 18198 #define AUXENT union external_auxent199 #define AUXESZ 18200 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 function203 grouping will have l_lnno = 0 and in place of physical address will be the204 symbol table index of the function name. */205 struct external_lineno206 {207 union208 {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_lineno217 #define LINESZ 6218 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_scnhdr223 {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_scnhdr237 #define SCNHSZ 40238 239 /* Names of "special" sections. */240 #define _TEXT ".text"241 #define _DATA ".data"242 #define _BSS ".bss"243 244 245 246 71 #endif /* __COFF_MCORE_H */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/mips.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 18 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 19 19 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" 31 23 32 24 /* Magic numbers are defined in coff/ecoff.h. */ … … 39 31 ((x).f_magic!=MIPS_MAGIC_BIG3)) 40 32 41 #define FILHDR struct external_filehdr42 #define FILHSZ 2043 33 44 34 /********************** AOUT "OPTIONAL HEADER" **********************/ 45 46 35 47 36 typedef struct external_aouthdr … … 66 55 #define AOUTHDRSZ 56 67 56 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_scnhdr84 #define SCNHSZ 4085 86 57 /********************** RELOCATION DIRECTIVES **********************/ 87 58 88 struct external_reloc { 89 unsigned char r_vaddr[4]; 90 unsigned char r_bits[4]; 91 }; 59 struct external_reloc 60 { 61 unsigned char r_vaddr[4]; 62 unsigned char r_bits[4]; 63 }; 92 64 93 65 #define RELOC struct external_reloc … … 179 151 /* File header as a set of bytes */ 180 152 181 struct hdr_ext { 153 struct hdr_ext 154 { 182 155 unsigned char h_magic[2]; 183 156 unsigned char h_vstamp[2]; … … 209 182 /* File descriptor external record */ 210 183 211 struct fdr_ext { 184 struct fdr_ext 185 { 212 186 unsigned char f_adr[4]; 213 187 unsigned char f_rss[4]; … … 255 229 /* Procedure descriptor external record */ 256 230 257 struct pdr_ext { 231 struct pdr_ext 232 { 258 233 unsigned char p_adr[4]; 259 234 unsigned char p_isym[4]; … … 274 249 /* Runtime procedure table */ 275 250 276 struct rpdr_ext { 251 struct rpdr_ext 252 { 277 253 unsigned char p_adr[4]; 278 254 unsigned char p_regmask[4]; … … 290 266 /* Line numbers */ 291 267 292 struct line_ext { 268 struct line_ext 269 { 293 270 unsigned char l_line[4]; 294 271 }; … … 296 273 /* Symbol external record */ 297 274 298 struct sym_ext { 275 struct sym_ext 276 { 299 277 unsigned char s_iss[4]; 300 278 unsigned char s_value[4]; … … 336 314 /* External symbol external record */ 337 315 338 struct ext_ext { 316 struct ext_ext 317 { 339 318 unsigned char es_bits1[1]; 340 319 unsigned char es_bits2[1]; … … 354 333 /* Dense numbers external record */ 355 334 356 struct dnr_ext { 335 struct dnr_ext 336 { 357 337 unsigned char d_rfd[4]; 358 338 unsigned char d_index[4]; … … 361 341 /* Relative file descriptor */ 362 342 363 struct rfd_ext { 343 struct rfd_ext 344 { 364 345 unsigned char rfd[4]; 365 346 }; … … 367 348 /* Optimizer symbol external record */ 368 349 369 struct opt_ext { 350 struct opt_ext 351 { 370 352 unsigned char o_bits1[1]; 371 353 unsigned char o_bits2[1]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/mipspe.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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 31 19 #define L_LNNO_SIZE 2 20 #define INCLUDE_COMDAT_FIELDS_IN_AUXENT 21 #include "coff/external.h" 32 22 33 23 #define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */ 34 24 #define MIPS_PE_MAGIC 0x010b 35 25 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) 65 27 66 28 /* define some NT default values */ … … 71 33 #define NT_DEF_COMMIT 0x1000 72 34 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" sections91 */92 #define _TEXT ".text"93 #define _DATA ".data"94 #define _BSS ".bss"95 96 97 #define SCNHDR struct external_scnhdr98 #define SCNHSZ 4099 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 function105 * grouping will have l_lnno = 0 and in place of physical address will be the106 * 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_lineno120 #define LINESZ 6121 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_syment130 {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_syment202 #define SYMESZ 18203 #define AUXENT union external_auxent204 #define AUXESZ 18205 206 207 208 35 /********************** RELOCATION DIRECTIVES **********************/ 209 36 210 37 /* The external reloc has an offset field, because some of the reloc 211 38 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. */ 213 40 214 struct external_reloc { 41 struct external_reloc 42 { 215 43 char r_vaddr[4]; 216 44 char r_symndx[4]; 217 45 char r_type[2]; 218 46 }; 219 220 47 221 48 #define RELOC struct external_reloc -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/powerpc.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 19 19 20 20 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" 36 24 37 25 /* 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). */ 44 31 45 32 #define F_RELFLG (0x0001) … … 58 45 #define PPCBADMAG(x) ((x).f_magic != PPCMAGIC) 59 46 60 /********************** AOUT "OPTIONAL HEADER" **********************/61 62 typedef struct63 {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 2876 #define AOUTHDRSZ 2877 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_scnhdr94 #define SCNHSZ 4095 96 /*97 * names of "special" sections98 */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 function109 * grouping will have l_lnno = 0 and in place of physical address will be the110 * 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_lineno121 #define LINESZ 6122 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_FILNMLEN129 #define E_FILNMLEN 14130 #endif131 132 #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */133 134 struct external_syment135 {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_syment151 #define SYMESZ 18152 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_auxent199 #define AUXESZ 18200 201 #define _ETEXT "etext"202 203 47 /********************** RELOCATION DIRECTIVES **********************/ 204 48 205 struct external_reloc { 49 struct external_reloc 50 { 206 51 char r_vaddr[4]; 207 52 char r_symndx[4]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/rs6000.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 67 67 #define AOUTHDRSZ 72 68 68 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 74 69 /********************** SECTION HEADER **********************/ 75 70 … … 88 83 }; 89 84 90 /*91 * names of "special" sections92 */93 #define _TEXT ".text"94 #define _DATA ".data"95 #define _BSS ".bss"96 #define _PAD ".pad"97 #define _LOADER ".loader"98 99 85 #define SCNHDR struct external_scnhdr 100 86 #define SCNHSZ 40 101 102 /* XCOFF uses a special .loader section with type STYP_LOADER. */103 #define STYP_LOADER 0x1000104 105 /* XCOFF uses a special .debug section with type STYP_DEBUG. */106 #define STYP_DEBUG 0x2000107 108 /* XCOFF handles line number or relocation overflow by creating109 another section header with STYP_OVRFLO set. */110 #define STYP_OVRFLO 0x8000111 87 112 88 /********************** LINE NUMBERS **********************/ … … 242 218 /* For new sections we havn't heard of before */ 243 219 #define DEFAULT_SECTION_ALIGNMENT 4 220 221 /* The ldhdr structure. This appears at the start of the .loader 222 section. */ 223 224 struct 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 238 struct 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 259 struct 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) -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/rs6k64.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* 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. 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 14 14 You should have received a copy of the GNU General Public License 15 15 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. */ 18 17 19 18 /********************** FILE HEADER **********************/ 20 19 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) 20 struct 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) 35 35 36 36 #define FILHDR struct external_filehdr … … 38 38 39 39 /********************** AOUT "OPTIONAL HEADER" **********************/ 40 41 40 42 41 typedef struct … … 45 44 unsigned char vstamp[2]; /* version stamp */ 46 45 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 */ 50 49 unsigned char o_snentry[2]; /* section number of entry point */ 51 50 unsigned char o_sntext[2]; /* section number of .text section */ … … 63 62 unsigned char bsize[8]; /* uninitialized data " " */ 64 63 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 (??) */ 67 66 unsigned char o_resv3[16]; /* reserved */ 68 67 } … … 73 72 #define AOUTHDRSZ 72 74 73 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 80 74 /********************** SECTION HEADER **********************/ 81 75 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" 76 struct 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 }; 105 90 106 91 #define SCNHDR struct external_scnhdr … … 108 93 #define SCNHSZ 72 109 94 110 /* XCOFF uses a special .loader section with type STYP_LOADER. */111 #define STYP_LOADER 0x1000112 113 /* XCOFF uses a special .debug section with type STYP_DEBUG. */114 #define STYP_DEBUG 0x2000115 116 /* XCOFF handles line number or relocation overflow by creating117 another section header with STYP_OVRFLO set. */118 #define STYP_OVRFLO 0x8000119 120 95 /********************** LINE NUMBERS **********************/ 121 96 122 97 /* 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 102 struct 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 }; 135 112 136 113 #define LINENO struct external_lineno 137 114 138 115 #define LINESZ 12 139 140 116 141 117 /********************** SYMBOLS **********************/ … … 147 123 struct external_syment 148 124 { 149 union { 150 char e_value[8]; 151 } e; 125 char e_value[8]; 152 126 char e_offset[4]; 153 127 char e_scnum[2]; … … 157 131 }; 158 132 159 160 161 133 #define N_BTMASK (017) 162 134 #define N_TMASK (060) 163 135 #define N_BTSHFT (4) 164 136 #define N_TSHIFT (2) 165 166 167 union external_auxent { 168 137 138 union external_auxent 139 { 169 140 struct { 170 141 union { … … 222 193 #define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK) 223 194 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. */ 225 196 #define _AUX_EXCEPT 255 226 197 #define _AUX_FCN 254 … … 229 200 #define _AUX_CSECT 251 230 201 231 232 233 202 /********************** RELOCATION DIRECTIVES **********************/ 234 203 235 236 struct external_reloc{204 struct external_reloc 205 { 237 206 char r_vaddr[8]; 238 207 char r_symndx[4]; … … 240 209 char r_type[1]; 241 210 }; 242 243 211 244 212 #define RELOC struct external_reloc … … 250 218 /* For new sections we havn't heard of before */ 251 219 #define DEFAULT_SECTION_ALIGNMENT 4 220 221 /* The ldhdr structure. This appears at the start of the .loader 222 section. */ 223 224 struct 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 239 struct 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 252 struct 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) -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/sh.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 /* coff information for HitachiSH1 /* coff information for Renesas SH 2 2 3 Copyright 2001 Free Software Foundation, Inc.3 Copyright 2001, 2003 Free Software Foundation, Inc. 4 4 5 5 This program is free software; you can redistribute it and/or modify … … 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 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" 32 26 33 27 #define SH_ARCH_MAGIC_BIG 0x0500 … … 36 30 #define SH_PE_MAGIC 0x010b 37 31 38 39 32 #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)) 69 36 70 37 /* Define some NT default values. */ … … 75 42 #define NT_DEF_COMMIT 0x1000 76 43 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" sections95 */96 #define _TEXT ".text"97 #define _DATA ".data"98 #define _BSS ".bss"99 100 101 #define SCNHDR struct external_scnhdr102 #define SCNHSZ 40103 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 function109 * grouping will have l_lnno = 0 and in place of physical address will be the110 * 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_PE118 char l_lnno[2]; /* line number */119 #else120 char l_lnno[4]; /* line number */121 #endif122 };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_lineno128 #ifdef COFF_WITH_PE129 #define LINESZ 6130 #undef GET_LINENO_LNNO131 #define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));132 #undef PUT_LINENO_LNNO133 #define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));134 #else135 #define LINESZ 8136 #endif137 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_syment146 {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_syment218 #define SYMESZ 18219 #define AUXENT union external_auxent220 #define AUXESZ 18221 222 223 224 44 /********************** RELOCATION DIRECTIVES **********************/ 225 45 226 46 /* The external reloc has an offset field, because some of the reloc 227 47 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. */ 229 49 230 50 #ifndef COFF_WITH_PE 231 struct external_reloc { 51 struct external_reloc 52 { 232 53 char r_vaddr[4]; 233 54 char r_symndx[4]; … … 237 58 }; 238 59 #else 239 struct external_reloc { 60 struct external_reloc 61 { 240 62 char r_vaddr[4]; 241 63 char r_symndx[4]; … … 243 65 }; 244 66 #endif 245 246 67 247 68 #define RELOC struct external_reloc -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/sparc.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 23 23 be used with different systems while still yielding the same results. */ 24 24 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" 37 29 38 30 #define F_RELFLG (0x0001) /* relocation info stripped */ … … 47 39 #define LYNXCOFFMAGIC (0415) 48 40 49 #define FILHDR struct external_filehdr50 #define FILHSZ 2051 52 /********************** AOUT "OPTIONAL HEADER" **********************/53 54 typedef struct55 {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 2868 #define AOUTHDRSZ 2869 70 41 #define OMAGIC 0404 /* object files, eg as output */ 71 42 #define ZMAGIC 0413 /* demand load format, eg normal ld output */ … … 73 44 #define SHMAGIC 0443 /* host shlib */ 74 45 75 /* ********************* SECTION HEADER **********************/46 /* More names of "special" sections. */ 76 47 77 struct external_scnhdr78 {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_scnhdr92 #define SCNHSZ 4093 94 /* Names of "special" sections. */95 96 #define _TEXT ".text"97 #define _DATA ".data"98 #define _BSS ".bss"99 48 #define _TV ".tv" 100 49 #define _INIT ".init" 101 50 #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 function109 grouping will have l_lnno = 0 and in place of physical address will be the110 symbol table index of the function name. */111 112 struct external_lineno113 {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_lineno122 #define LINESZ (6)123 51 124 52 /********************** SYMBOLS **********************/ … … 214 142 /********************** RELOCATION DIRECTIVES **********************/ 215 143 216 struct external_reloc { 144 struct external_reloc 145 { 217 146 char r_vaddr[4]; 218 147 char r_symndx[4]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/ti.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 18 18 along with this program; if not, write to the Free Software 19 19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 20 21 20 #ifndef COFF_TI_H 22 21 #define COFF_TI_H 23 22 23 /* Note "coff/external.h is not used because TI adds extra fields to the structures. */ 24 24 25 /********************** FILE HEADER **********************/ 25 26 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 }; 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 char f_target_id[2]; /* magic no. (TI COFF-specific) */ 37 }; 36 38 37 39 /* COFF0 has magic number in f_magic, and omits f_target_id from the file … … 54 56 #ifndef TICOFF_TARGET_ARCH 55 57 #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) 56 66 #endif 57 67 … … 90 100 /* we need to read/write an extra field in the coff file header */ 91 101 #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) 96 109 #endif 97 110 98 111 #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) 103 119 #endif 104 120 … … 111 127 #define F_EXEC (0x0002) 112 128 #define F_LNNO (0x0004) 129 #define F_VERS (0x0010) /* TMS320C4x code */ 113 130 /* F_LSYMS needs to be redefined in your source file */ 114 131 #define F_LSYMS_TICOFF (0x0010) /* normal COFF is 0x8 */ … … 199 216 accordingly 200 217 */ 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)) 215 232 /* 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)) 219 237 220 238 /* TI COFF stores section size as number of bytes (address units, not octets), 221 239 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) 231 252 232 253 /* The line number and reloc overflow checking in coff_swap_scnhdr_out in … … 235 256 fields. 236 257 */ 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) 269 271 270 272 /* … … 385 387 386 388 /* 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) 392 393 393 394 /* lnsz size is in bits in COFF file, in bytes in BFD */ 394 395 #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)) 397 397 398 398 #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) 401 401 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) 414 434 415 435 /* Detect section-relative absolute symbols so they get flagged with a sym 416 436 index of -1. 417 437 */ 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') 421 441 422 442 /********************** RELOCATION DIRECTIVES **********************/ 423 443 424 struct external_reloc_v0 { 444 struct external_reloc_v0 445 { 425 446 char r_vaddr[4]; 426 447 char r_symndx[2]; … … 429 450 }; 430 451 431 struct external_reloc { 452 struct external_reloc 453 { 432 454 char r_vaddr[4]; 433 455 char r_symndx[4]; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/tic30.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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
-
branches/GNU/src/binutils/include/coff/tic54x.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 19 19 20 20 #ifndef COFF_TIC54X_H 21 #define COFF_TIC54X_H 21 22 22 #define COFF_TIC54X_H23 23 #define TIC54X_TARGET_ID 0x98 24 24 #define TIC54XALGMAGIC 0x009B /* c54x algebraic assembler output */ … … 30 30 #define TICOFF_DEFAULT_MAGIC TICOFF1MAGIC /* we use COFF1 for compatibility */ 31 31 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 32 57 #include "coff/ti.h" 33 58 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/tic80.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 17 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 18 18 19 #define DO_NOT_DEFINE_FILHDR 20 #define DO_NOT_DEFINE_SCNHDR 21 #define L_LNNO_SIZE 2 22 #include "coff/external.h" 23 19 24 /********************** FILE HEADER **********************/ 20 25 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) */ 26 struct 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) */ 30 36 }; 31 37 … … 38 44 #define FILHSZ 22 39 45 40 41 /********************** AOUT "OPTIONAL HEADER" **********************/42 43 44 typedef struct45 {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 57 46 #define TIC80_AOUTHDR_MAGIC 0x108 /* Goes in the optional file header magic number field */ 58 59 #define AOUTHDRSZ 2860 #define AOUTSZ 2861 62 63 64 47 65 48 /********************** SECTION HEADER **********************/ 66 49 67 68 struct external_scnhdr{50 struct external_scnhdr 51 { 69 52 char s_name[8]; /* section name */ 70 53 char s_paddr[4]; /* physical address, aliased s_nlib */ … … 81 64 }; 82 65 83 /* 84 * names of "special" sections 85 */ 66 /* Names of "special" sections. */ 86 67 #define _TEXT ".text" 87 68 #define _DATA ".data" … … 93 74 #define _SYSMEM ".sysmem" 94 75 95 96 76 #define SCNHDR struct external_scnhdr 97 77 #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 function104 * grouping will have l_lnno = 0 and in place of physical address will be the105 * 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_lineno119 #define LINESZ 6120 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_syment129 {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)150 78 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 */ 203 81 204 82 /********************** RELOCATION DIRECTIVES **********************/ … … 206 84 /* The external reloc has an offset field, because some of the reloc 207 85 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. */ 209 87 210 struct external_reloc { 88 struct external_reloc 89 { 211 90 char r_vaddr[4]; 212 91 char r_symndx[4]; … … 214 93 char r_type[2]; 215 94 }; 216 217 95 218 96 #define RELOC struct external_reloc -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/w65.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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 31 19 #define L_LNNO_SIZE 4 20 #include "coff/external.h" 32 21 33 22 #define W65MAGIC 0x6500 34 23 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)) 196 25 197 26 /********************** RELOCATION DIRECTIVES **********************/ … … 201 30 offset - eg the strange jump and high page addressing modes */ 202 31 203 struct external_reloc { 32 struct external_reloc 33 { 204 34 char r_vaddr[4]; 205 35 char r_symndx[4]; … … 209 39 }; 210 40 211 212 41 #define RELOC struct external_reloc 213 42 #define RELSZ 16 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/we32k.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 16 16 along with this program; if not, write to the Free Software 17 17 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" 31 20 32 21 /* 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). */ 39 27 40 28 #define F_RELFLG (0x0001) … … 49 37 #define MTVMAGIC 0x171 /* we32k with transfer vector */ 50 38 #define RBOMAGIC 0x172 /* reserved */ 51 #define WE32KBADMAG(x) ( ((x).f_magic != WE32KMAGIC) \39 #define WE32KBADMAG(x) ( ((x).f_magic != WE32KMAGIC) \ 52 40 && ((x).f_magic != FBOMAGIC) \ 53 41 && ((x).f_magic != RBOMAGIC) \ 54 42 && ((x).f_magic != MTVMAGIC)) 55 43 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. */ 104 45 #define _TV ".tv" 105 46 #define _INIT ".init" 106 47 #define _FINI ".fini" 107 48 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 function112 * grouping will have l_lnno = 0 and in place of physical address will be the113 * 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_lineno125 #define LINESZ 6126 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_syment135 {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_syment201 #define SYMESZ 18202 #define AUXENT union external_auxent203 #define AUXESZ 18204 205 206 # define _ETEXT "etext"207 208 209 49 /********************** RELOCATION DIRECTIVES **********************/ 210 50 211 212 213 struct external_reloc { 51 struct external_reloc 52 { 214 53 char r_vaddr[4]; 215 54 char r_symndx[4]; … … 217 56 }; 218 57 219 220 58 #define RELOC struct external_reloc 221 59 #define RELSZ 10 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/binutils/include/coff/z8k.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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 /* Type of cpu is stored in flags */ … … 35 25 #define F_MACHMASK 0xf000 36 26 37 #define Z8KMAGIC 27 #define Z8KMAGIC 0x8000 38 28 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)) 146 30 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_syment194 #define SYMESZ 18195 #define AUXENT union external_auxent196 #define AUXESZ 18197 198 199 200 31 /********************** RELOCATION DIRECTIVES **********************/ 201 32 202 33 /* The external reloc has an offset field, because some of the reloc 203 34 types on the z8k don't have room in the instruction for the entire 204 offset - eg with segments */35 offset - eg with segments. */ 205 36 206 struct external_reloc { 37 struct external_reloc 38 { 207 39 char r_vaddr[4]; 208 40 char r_symndx[4]; … … 212 44 }; 213 45 214 215 46 #define RELOC struct external_reloc 216 47 #define RELSZ 16 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.