This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Prevent overflow for large MIPS binaries with TLS
- From: Thiemo Seufer <ths at networkno dot de>
- To: binutils at sourceware dot org, richard at codesourcery dot com
- Date: Wed, 1 Nov 2006 00:57:04 +0000
- Subject: Re: Prevent overflow for large MIPS binaries with TLS
- References: <20061031232045.GA10833@nevyn.them.org>
Daniel Jacobowitz wrote:
> A customer gave us a testcase today where the total number of GOT entries in
> the primary GOT ended up being:
> global_gotno 16204
> tls_gotno 23
> local_gotno 219
> assigned_gotno 138
>
> What this works out to is that if you add the GOT entries for global
> symbols, TLS symbols, and local symbols (ignoring entries for
> R_MIPS_GOT_PAGE), then you've got enough room. But we overallocate for page
> relocations because we can't easily predict how many will end up needed.
> I tracked this down to the one place where we ignore the number of
> potential local pages, yielding the attached (fairly obvious) patch.
>
> OK? Anyone want to double-check my logic on that?
Ok.
Thiemo