Why present different size and md5 hash between the compiled code and FreeBSD's build-in binary ?

Max Laier max at love2party.net
Tue Oct 12 08:42:35 PDT 2004


On Tuesday 12 October 2004 13:11, Andreas Kohn wrote:
> Jerry wrote:
> > --- Andreas Kohn <andreas.kohn at gmx.net> wrote¡G
> >
> >>Hi,
> >>
> >>you might be using different optimization flags than
> >>the release
> >>building cluster.
> >>Also make sure that you have really the correct
> >>sources, and not a newer
> >>version from CVS.
> >
> >Hi~ Andreas,
> >
> >I just used make command with default Makefile to
> >build the binary,without change any gcc flag or
> >option.
> >And never go through the CVS to get newer source, by
> >the way, my test platfrom is Release-5.2 on x86, Have
> >you ever met this kind of situation? Whether
> >compile "binary command" or "kernel code" ?
> >
> >Best Regards.
> >Jerry
>
> Hi,
>
> if your source files are *exactly* the same versions used as on the
> building cluster, and you have *exactly* the same compilation options,
> it would still be possible to have different binaries. For example if
> the files included some reference to the current time, either in some
> flags in the generated .o, .a, .so, or perhaps in the source code of
> auto-generated headers. Some paths referenced could also be different on
> your system than on the build cluster.
>
> In short: don't worry too much. It is normal.

If you care to know what changed exactly, you might find objdump(1) helpful. 
You must have some experience with reading assembler, though.

$ objdump -d bin.orig > dump.orig
$ objdump -d bin | diff -u dump.orig -

Also ident(1) is sometimes helpful to determine if you are *really* using the 
same source files.

-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20041012/a41aa536/attachment.bin


More information about the freebsd-hackers mailing list