This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: build id computation
- From: Ian Lance Taylor <iant at google dot com>
- To: Jan Blunck <jblunck at suse dot de>
- Cc: binutils at sourceware dot org, roland at redhat dot com
- Date: Tue, 18 Nov 2008 07:54:31 -0800
- Subject: Re: build id computation
- References: <20081118112528.GD16575@bolzano.suse.de>
Jan Blunck <jblunck@suse.de> writes:
> For computing the build id following things are used:
>
> - the ELF header, without e_phoff and e_shoff
> - all segments content
> - all sections content
>
> Is there any particular reason for doing that?
>
> I think that it would be enough to account only the load segments and/or the
> allocated sections. Besides that the number of program or sections headers
> should be ignored as well as the section header string table index.
For gold I just checksum the entire contents of the output file.
During the computation the value of the checksum itself in the build
ID note is set to zero bytes. I don't think it's appropriate to worry
about cases where two different files should have the same build ID;
people who want to use the build ID in that fashion can set it
explicitly, rather than using one of the checksum styles.
Ian