From: Ian Lance Taylor Date: Fri, 7 Mar 2008 16:27:33 +0000 (+0000) Subject: From Craig Silverstein: implement --hash-bucket-empty-fraction for real. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8627968fb4c8ffef2e12f915c0230f8924e3a62;p=binutils-gdb.git From Craig Silverstein: implement --hash-bucket-empty-fraction for real. --- diff --git a/gold/dynobj.cc b/gold/dynobj.cc index 6c0a4b28a56..558129837e5 100644 --- a/gold/dynobj.cc +++ b/gold/dynobj.cc @@ -698,9 +698,11 @@ Dynobj::compute_bucket_count(const std::vector& hashcodes, unsigned int symcount = hashcodes.size(); unsigned int ret = 1; + const double full_fraction + = 1.0 - parameters->options().hash_bucket_empty_fraction(); for (int i = 0; i < buckets_count; ++i) { - if (symcount < buckets[i]) + if (symcount < buckets[i] * full_fraction) break; ret = buckets[i]; }