Improve MIPS GOT_PAGE estimates

Thiemo Seufer ths@networkno.de
Wed Mar 26 16:54:00 GMT 2008


Daniel Jacobowitz wrote:
> One of our users reported GOT overflows when linking N64 code which
> used %got_page.  We tracked this to the new estimation function;
> it is only called for local or forced-local symbols.  That seems OK
> at first, since otherwise %got_page decays to %got_disp for
> overridable symbols - except that in check_relocs, we do not know
> whether a symbol will be ultimately overridable or not.
> 
> This patch makes the heuristic a little more conservative.  There's
> room for further improvement (combining references to a single global
> symbol from multiple object files), but they offer relatively little
> value for a relatively large amount of work; so I left it at this.
> 
> Tested mips-linux, no regressions.  OK to commit?
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery
> 
> 2008-03-26  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
> 	(_bfd_mips_elf_check_relocs): Update comments.  Always call
> 	mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.

Ok.


Thiemo



More information about the Binutils mailing list