[gnu.utils.bug] COFF

ewerlid@kuling.UUCP (Ove Ewerlid) (11/28/88)

Some comments on the current implementation of encapsulated BSD files.

A COFF encapsulated BSD-file is essentially a BSD-file converted to COFF.
This is true for everything but the symboltable. The symboltable is stored
as the ordinary COFF ditto alas the BSDsymbols do not have the same format
as COFFsymbols. The fileheader still indicates the existence of *some*
number of symbols.

What happens when a COFFadopted debugger tries to resolve those symbols?
It does not say - 'Bad symbol format' - and allows the user access to
whatever features are available without symbols.
It says 'bus error - core dumped'! This is the reaction of the adb:s I've
tested so far.

The cure is to strip the file. It's not wise to force people to strip
files. Someday one might want to run gdb on the file alas there are no
symboltable, the source might be lost etc etc.

The point is that the above can be avoided. The thing to do is to put the
symbols in a separate section of the COFFfile, why not name it .gdb.
GDB will not notice any difference as the symbol- and string-table still
is in the bsd-shape. Just the way to calculate the pointer to the tables
differs. (To alter this we need to hack gnu-ld and gdb)

There are good and bad ways to do things, choose the bad if you
can't do it the good way but remember: bad is never good!

/Ove