3.2.1 Porting to a new version of coff
The recommended method is to select from the existing
implementations the version of coff which is most like the one
you want to use. For example, we'll say that i386 coff is
the one you select, and that your coff flavour is called foo.
Copy `i386coff.c' to `foocoff.c', copy
`../include/coff/i386.h' to `../include/coff/foo.h',
and add the lines to `targets.c' and `Makefile.in'
so that your new back end is used. Alter the shapes of the
structures in `../include/coff/foo.h' so that they match
what you need. You will probably also have to add
#ifdefs to the code in `coff/internal.h' and
`coffcode.h' if your version of coff is too wild.
You can verify that your new BFD backend works quite simply by
building `objdump' from the `binutils' directory,
and making sure that its version of what's going on and your
host system's idea (assuming it has the pretty standard coff
dump utility, usually called
att-dump or just
dump) are the same. Then clean up your code, and send
what you've done to Cygnus. Then your stuff will be in the
next release, and you won't have to keep integrating it.