Comparing object files

Michael Meissner <>
Tue, 9 Aug 1994 23:14:43 GMT

          From comp.compilers

Related articles
Re: Weeding out unwanted include files gary@Intrepid.COM (1994-08-02)
Re: Weeding out unwanted include files (1994-08-04)
Comparing object files shawn@grok90.columbiasc.NCR.COM (Shawn Shealy) (1994-08-08)
Comparing object files (Michael Meissner) (1994-08-09)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Michael Meissner <>
Keywords: linker, tools
Organization: Compilers Central
References: 94-08-031 94-08-050
Date: Tue, 9 Aug 1994 23:14:43 GMT
Status: RO

| Does anyone know of a utility to compare functions in an unstripped object
| file? In particular, I want such a utility for 80386 ELF files.
| I'm making many changes to a large C program (and it's #includes) and want
| to be able to tell exactly which functions I impacted (and know that I
| didn't affect others).
| I'd like to be able to compile this program without my changes and
| then with my changes (using the same compiler and options) and then see
| the functions that changed.

It would perhaps be simpler to write a wrapper around your compiler
that first compiles with the -S option and then assembles the
resulting .s file. That way to compare things, just use diff, which
will tell you where the first change is (when comparing assembly
files, changes made after the first change may percolate through the
rest of the file as statement labels/registers change). It is usually
helpful to compiler with -g to identify the line associated with the

I'm using GCC's -save-temps switch (which saves the .s file and
continues on) in precisely this fashion to tune the intel 386 port
right now. I also find emacs19.24's ediff mode to be helpful in
identifying exactly what changed, since it will highlight (on my X
screen) exactly what parts of the line changed, allowing me to quickly
skip over local labels that have changed due to earlier changes, and
different register assignments.

Michael Meissner email: phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.