[PATCH] D18055: ELF: Implement --build-id.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 08:56:46 PST 2016
Non-secure hash function such as FNV1 can be written in 10 lines of code or
so, so we don't necessarily have to use ADT/Hashing.h.
The question is whether we need to use a secure hash or not. If we can
accept a collision of build ID (although it's a very low probability), we
should use a non-secure hash. If not, we need to use a secure hash. It
seems to me that everybody's basically okay with a very low probability of
collision for the sake of performance? So here's my plan.
- Use a fast non-secure hash function as default for --build-id
- Implement --build-id=md5 (GNU ld and gold both have this option) so that
users can choose the secure hash function
Any objections/concerns?
On Fri, Mar 11, 2016 at 8:33 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> On 11 March 2016 at 00:16, Rui Ueyama <ruiu at google.com> wrote:
> > hash_value in ADT/Hashing is pretty fast that self link time increased
> from
> > 0.6453 to 0.6604 seconds (in wall clock time), so it's within a few
> percent
> > increase. Very interesting result, but I'm not still sure if it's what
> > people expect on --build-id.
>
> Note that unfortunately ADT/Hashing.h is not reproducible. In
> particular, it produces different results in 32 and 64 bit machines.
>
> It would be nice to refactor it so that the same algorithm can be used
> for both "fast, but not reproducible" and "not as fast, but
> reproducible" cases.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160311/4770fddd/attachment.html>
More information about the llvm-commits
mailing list