This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: build id computation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]