www.delorie.com/gnu/docs/binutils/bfd_197.html   search  
Buy GNU books!

Untitled Document

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] File layout

The Coff backend is split into generic routines that are applicable to any Coff target and routines that are specific to a particular target. The target-specific routines are further split into ones which are basically the same for all Coff targets except that they use the external symbol format or use different values for certain constants.

The generic routines are in `coffgen.c'. These routines work for any Coff target. They use some hooks into the target specific code; the hooks are in a bfd_coff_backend_data structure, one of which exists for each target.

The essentially similar target-specific routines are in `coffcode.h'. This header file includes executable C code. The various Coff targets first include the appropriate Coff header file, make any special defines that are needed, and then include `coffcode.h'.

Some of the Coff targets then also have additional routines in the target source file itself.

For example, `coff-i960.c' includes `coff/internal.h' and `coff/i960.h'. It then defines a few constants, such as I960, and includes `coffcode.h'. Since the i960 has complex relocation types, `coff-i960.c' also includes some code to manipulate the i960 relocs. This code is not in `coffcode.h' because it would not be used by any other target.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003