mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
bfd/
PR ld/12637 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count as the number of global entries when merging with the primary GOT.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
|
PR ld/12637
|
||||||
|
* elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
|
||||||
|
as the number of global entries when merging with the primary GOT.
|
||||||
|
|
||||||
2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
|
2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* elf32-i386.c: Update copyright year.
|
* elf32-i386.c: Update copyright year.
|
||||||
|
@ -4080,14 +4080,18 @@ mips_elf_merge_got_with (struct mips_elf_bfd2got_hash *bfd2got,
|
|||||||
if (estimate >= from->page_gotno + to->page_gotno)
|
if (estimate >= from->page_gotno + to->page_gotno)
|
||||||
estimate = from->page_gotno + to->page_gotno;
|
estimate = from->page_gotno + to->page_gotno;
|
||||||
|
|
||||||
/* And conservatively estimate how many local, global and TLS entries
|
/* And conservatively estimate how many local and TLS entries
|
||||||
would be needed. */
|
would be needed. */
|
||||||
estimate += (from->local_gotno
|
estimate += from->local_gotno + to->local_gotno;
|
||||||
+ from->global_gotno
|
estimate += from->tls_gotno + to->tls_gotno;
|
||||||
+ from->tls_gotno
|
|
||||||
+ to->local_gotno
|
/* If we're merging with the primary got, we will always have
|
||||||
+ to->global_gotno
|
the full set of global entries. Otherwise estimate those
|
||||||
+ to->tls_gotno);
|
conservatively as well. */
|
||||||
|
if (to == arg->primary)
|
||||||
|
estimate += arg->global_count;
|
||||||
|
else
|
||||||
|
estimate += from->global_gotno + to->global_gotno;
|
||||||
|
|
||||||
/* Bail out if the combined GOT might be too big. */
|
/* Bail out if the combined GOT might be too big. */
|
||||||
if (estimate > arg->max_count)
|
if (estimate > arg->max_count)
|
||||||
|
Reference in New Issue
Block a user