ld: Avoid overflows in string merging

Jan Beulich jbeulich@suse.com
Thu Nov 9 07:55:43 GMT 2023


On 08.11.2023 17:16, Michael Matz wrote:
> On Wed, 8 Nov 2023, Michael Matz wrote:
> 
>>> Otoh aren't we also at risk of underestimating when entsize == 1 and
>>> we're not dealing with strings?
>>
>> Hmm, that's true.  I need to fix that.
> 
> Ah, no.  I remember: the nr of buckets starts out as 0x2000, which is 
> impossible to reach by distinct size 1 entities, no matter how 
> underestimating the estimation is.  So, it's confusing but not wrong :)

Oh, indeed (should have connected the two things I said in the earlier
reply). That means, though, that for entsize == 1 (and not strings)
there would _never_ be a reason to resize (and, just to extend that
slightly, there would never be a reason to further resize once for
entsize == 2 we've reached 64k entries).

Jan



More information about the Binutils mailing list