In article <xPNFf.1$ XXXX@XXXXX.COM >, Robert Halonen
If sources and makefiles hasn't changed, then it's probably compiler
changes -- usually bugfixes or better optimized code generation.
You could disassemble the binaries and compare to identify differences.
Since you say it's a slight change in file size, the differences are
most likely not that large, and can be read by hand once the diff'd
sections has been identified.
You can also use /usr/ccs/bin/elfdump to compare the functions
enumerated in both sets of binaries. I'm not sure there's a Solaris
utility like GNU's objdump (part of their binutils tools).
(As of Solaris 9/SPARC, elfdump was in the SUNWbtool package.)
With GNU's objdump, if you build the binaries with -g, then you can use
objdump -d -S to show both an assembly language disassembly along with
references to the corresponding source code lines.
E.g., on Linux with GNU binutils installed:
$ vi hello.c
#include <stdio.h>
int main()
{
int foo=0;
printf("Hello, world!\n");
foo=5;
}
$ gcc hello.c -g -o hello
$ objdump -d -S hello
[...]
08048384 <main>:
#include <stdio.h>
int main()
{
8048384: 55 push %ebp
8048385: 89 e5 mov %esp,%ebp
8048387: 83 ec 08 sub $0x8,%esp
804838a: 83 e4 f0 and $0xfffffff0,%esp
804838d: b8 00 00 00 00 mov $0x0,%eax
8048392: 29 c4 sub %eax,%esp
int foo=0;
8048394: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp)
printf("Hello, world!\n");
804839b: c7 04 24 a4 84 04 08 movl $0x80484a4,(%esp)
80483a2: e8 01 ff ff ff call 80482a8 <printf@plt>
foo=5;
80483a7: c7 45 fc 05 00 00 00 movl $0x5,0xfffffffc(%ebp)
}
80483ae: c9 leave
80483af: c3 ret
[...]
I am not sure what the Solaris equivalent to objdump -d -S might be, but
mentioned the GNU version here so that someone may be able to offer the
Solaris equivalent.
-Dan