build id computation
Ian Lance Taylor
iant@google.com
Tue Nov 18 15:56:00 GMT 2008
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
More information about the Binutils
mailing list