Lines Matching full:coff
1 /* Support for the generic parts of most COFF variants, for BFD.
26 coff backends
28 BFD supports a number of different flavours of coff format.
33 Coff in all its varieties is implemented with a few common
35 example, The 88k bcs coff format is implemented in the file
36 @file{coff-m88k.c}. This file @code{#include}s
37 @file{coff/m88k.h} which defines the external structure of the
38 coff format for the 88k, and @file{coff/internal.h} which
39 defines the internal structure. @file{coff-m88k.c} also
43 The Intel i960 processor version of coff is implemented in
44 @file{coff-i960.c}. This file has the same structure as
45 @file{coff-m88k.c}, except that it includes @file{coff/i960.h}
46 rather than @file{coff-m88k.h}.
49 Porting to a new version of coff
52 implementations the version of coff which is most like the one
53 you want to use. For example, we'll say that i386 coff is
54 the one you select, and that your coff flavour is called foo.
56 @file{../include/coff/i386.h} to @file{../include/coff/foo.h},
59 structures in @file{../include/coff/foo.h} so that they match
61 @code{#ifdef}s to the code in @file{coff/internal.h} and
62 @file{coffcode.h} if your version of coff is too wild.
67 host system's idea (assuming it has the pretty standard coff
74 How the coff backend works
79 The Coff backend is split into generic routines that are
80 applicable to any Coff target and routines that are specific
83 Coff targets except that they use the external symbol format
87 work for any Coff target. They use some hooks into the target
93 The various Coff targets first include the appropriate Coff
97 Some of the Coff targets then also have additional routines in
100 For example, @file{coff-i960.c} includes
101 @file{coff/internal.h} and @file{coff/i960.h}. It then
104 types, @file{coff-i960.c} also includes some code to
110 Coff long section names
112 In the standard Coff object format, section names are limited to
118 The Microsoft PE variants of the Coff object file format add
120 extension is defined in section 4 of the Microsoft PE/COFF
136 that Coff debugging information is deprecated, not forbidden,
146 @code{_bfd_coff_set_long_section_names}, in the Coff backend data
174 Each flavour of coff supported in BFD has its own header file
176 an internal description of the coff layout, in
177 @file{coff/internal.h}. A major function of the
178 coff backend is swapping the bytes and twiddling the bits to
183 coff; it is the duty of the coff version specific include file
185 @file{coffcode.h}. E.g., the size of line number entry in coff is
189 coff which has a varying field size not catered to at the
210 enough to keep all the information available in a coff symbol
217 the coff file and swaps all the structures inside into the
231 At this time the symbol names are moved around. Coff stores
244 Any linenumbers are read from the coff file too, and attached
250 Writing a symbol to a coff file which didn't come from a coff
256 When the symbols have come from a coff file then all the
271 value form of BFD into the form used by coff. Internally, BFD
274 0x100, would have the value 0x20. Coff expects symbols to
286 structured hierarchy required by coff. It changes each pointer
292 symbols from their internal form into the coff way, calls the
670 information. STYP_* are the COFF section flags which appear in
671 COFF files. IMAGE_SCN_* are the PE section flags which appear in
762 /* For 386 COFF, at least, an unloadable text or data section is
1340 .{* COFF symbol classifications. *}
1360 Special entry points for gdb to swap in coff symbol table parts:
1761 particular implementation of COFF. */
1992 coff_data_type *coff;
1998 coff = coff_data (abfd);
1999 coff->symbols = NULL;
2000 coff->conversion_table = NULL;
2001 coff->raw_syments = NULL;
2002 coff->relocbase = 0;
2003 coff->local_toc_sym_map = 0;
2011 /* Create the COFF backend specific information. */
2020 coff_data_type *coff;
2025 coff = coff_data (abfd);
2027 coff->sym_filepos = internal_f->f_symptr;
2031 unfortunately vary among coff implementations... */
2032 coff->local_n_btmask = N_BTMASK;
2033 coff->local_n_btshft = N_BTSHFT;
2034 coff->local_n_tmask = N_TMASK;
2035 coff->local_n_tshift = N_TSHIFT;
2036 coff->local_symesz = bfd_coff_symesz (abfd);
2037 coff->local_auxesz = bfd_coff_auxesz (abfd);
2038 coff->local_linesz = bfd_coff_linesz (abfd);
2040 coff->timestamp = internal_f->f_timdat;
2075 /* Set the flags field from the COFF header read in. */
2077 coff->flags = 0;
2089 coff->go32stub = (char *) bfd_alloc (abfd, (bfd_size_type) GO32_STUBSIZE);
2090 if (coff->go32stub == NULL)
2093 if (coff->go32stub != NULL)
2094 memcpy (coff->go32stub, internal_f->go32stub, GO32_STUBSIZE);
2096 return coff;
2105 at linking together COFF files for different architectures. */
2159 /* The COFF header does not have enough bits available
2434 /* This TI COFF section should be used by all new TI COFF v0 targets. */
2443 /* This TI COFF section should be used by all new TI COFF v1/2 targets. */
2458 (_("Unrecognized TI COFF target id '0x%x'"),
2816 /* Set flags and magic number of a coff file from architecture and machine
2896 /* We may want to output in a different COFF version. */
2999 /* NAMES_HAVE_UNDERSCORE may be defined by coff-u68k.c. */
3856 /* TI COFF puts the alignment power in bits 8-11 of the flags. */
4062 /* Target id is used in TI COFF v1 and later; COFF0 won't use this field,
4245 /* If bfd_get_symcount (abfd) != 0, then we are not using the COFF
4392 include/coff/pe.h sets AOUTSZ == sizeof (PEAOUTHDR)). */
4515 coff
4517 A coff linenumber table is structured so that each function
4920 /* C_AUTOARG conflicts with TI COFF C_UEXT. */
5049 /* C_LINE in regular coff is 0x68. NT has taken over this storage
5055 /* New storage classes for TI COFF. */
5103 /* Classify a COFF symbol. A couple of targets have globally visible
5202 Coff relocations are easily transformed into the internal BFD form
5205 Reading a coff relocation table is done in the following stages:
5207 o Read the entire coff relocation table into memory.
5451 /* If coff_relocate_section is defined, we can use the optimized COFF
5987 /* The reloc lookup routine must be supplied by each individual COFF
6070 BFD_JUMP_TABLE_GENERIC (coff), \
6071 BFD_JUMP_TABLE_COPY (coff), \
6074 BFD_JUMP_TABLE_SYMBOLS (coff), \
6075 BFD_JUMP_TABLE_RELOCS (coff), \
6076 BFD_JUMP_TABLE_WRITE (coff), \
6077 BFD_JUMP_TABLE_LINK (coff), \
6121 BFD_JUMP_TABLE_GENERIC (coff), \
6122 BFD_JUMP_TABLE_COPY (coff), \
6125 BFD_JUMP_TABLE_SYMBOLS (coff), \
6126 BFD_JUMP_TABLE_RELOCS (coff), \
6127 BFD_JUMP_TABLE_WRITE (coff), \
6128 BFD_JUMP_TABLE_LINK (coff), \
6170 BFD_JUMP_TABLE_GENERIC (coff), \
6171 BFD_JUMP_TABLE_COPY (coff), \
6174 BFD_JUMP_TABLE_SYMBOLS (coff), \
6175 BFD_JUMP_TABLE_RELOCS (coff), \
6176 BFD_JUMP_TABLE_WRITE (coff), \
6177 BFD_JUMP_TABLE_LINK (coff), \