[comp.lang.c] Object file formats

scs@adam.mit.edu (Steve Summit) (01/02/91)

In article <310@audfax.audiofax.com> Arnold Robbins writes:
>Andrew is fortunate enough to be running on a Unix system that doesn't
>use COFF for it's object files --- COFF files have a timestamp in them.
>If you know where it is (I don't), you can arrange to strip off the
>COFF header and then compare the objects...

(Others have correctly noted that a workable solution to the
immediate problem is to use cmp -l.)

Just a side note to those designing object file formats and the
programs that manipulate them: it would be extremely nice if the
nonessential information could be optionally suppressed, for
exactly this reason.  (There is usually adequate control over the
amount of source line number and other debugging information;
what's needed is a way to suppress _everything_ -- symbol tables,
relocation information, source file information, invocation
options, compilation timestamps -- other than the basic machine
code found in an old-style Unix a.out file.)  I'm not arguing
against the default presence of extra information (it's usually
useful, and I often wish there were more, such as source file
name, timestamp, and/or inode so that a source-level debugger
wouldn't quietly show me the wrong lines when single-stepping a
module which I've inadvertently modified since compiling); I'm
just asking for the traditional extra degree of flexibility (i.e.
creeping feature).

                                            Steve Summit
                                            scs@adam.mit.edu