diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-02-11 17:25:23 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-02-11 17:25:23 +0000 |
commit | 172149374ec64b82f39a3d572211bfe92e62b182 (patch) | |
tree | 1fbd6e644dc382448398b4c7c081e3f9882dbf8e | |
parent | 9efeb38dd1806d9c18b31baf594de95249f59319 (diff) | |
download | gdb-172149374ec64b82f39a3d572211bfe92e62b182.zip gdb-172149374ec64b82f39a3d572211bfe92e62b182.tar.gz gdb-172149374ec64b82f39a3d572211bfe92e62b182.tar.bz2 |
bfd/
* elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
if there are TLS relocations.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 79c4102..be33a47 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com> + * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count + if there are TLS relocations. + +2013-02-11 Richard Sandiford <rdsandiford@googlemail.com> + * elfxx-mips.c (mips_elf_recreate_got): Remove free. (mips_elf_resolve_final_got_entries): Remove bogus comment. diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 9a92e2d..abf2156 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -4275,10 +4275,10 @@ mips_elf_merge_got_with (struct mips_elf_bfd2got_hash *bfd2got, estimate += from->local_gotno + to->local_gotno; estimate += from->tls_gotno + to->tls_gotno; - /* If we're merging with the primary got, we will always have - the full set of global entries. Otherwise estimate those + /* If we're merging with the primary got, any TLS relocations will + come after the full set of global entries. Otherwise estimate those conservatively as well. */ - if (to == arg->primary) + if (to == arg->primary && from->tls_gotno + to->tls_gotno) estimate += arg->global_count; else estimate += from->global_gotno + to->global_gotno; |