diff options
author | Alan Modra <amodra@gmail.com> | 2015-02-27 11:43:21 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-02-28 13:09:11 +1030 |
commit | f01f1741df37f0330fbf2809df0ffddc992ff60c (patch) | |
tree | f4c9374b540870f608a60003d57db8dd9da12a59 | |
parent | eb704cb6566cc4594099f49f8a215bab4fa7bbb6 (diff) | |
download | gdb-f01f1741df37f0330fbf2809df0ffddc992ff60c.zip gdb-f01f1741df37f0330fbf2809df0ffddc992ff60c.tar.gz gdb-f01f1741df37f0330fbf2809df0ffddc992ff60c.tar.bz2 |
Tweak ppc32 tls_get_addr optimisation
This patch is cosmetic. It prevents references to __tls_get_addr_opt
(an alias for __tls_get_addr) when the optimisation isn't possible.
* elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
not PLT_NEW.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8cd5741..57bc637 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2015-02-28 Alan Modra <amodra@gmail.com> + + * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if + not PLT_NEW. + 2015-02-27 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (need_convert_mov_to_lea): New. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index cee589f..cc16b0d 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -5093,6 +5093,9 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) htab = ppc_elf_hash_table (info); htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", FALSE, FALSE, TRUE); + if (htab->plt_type != PLT_NEW) + htab->params->no_tls_get_addr_opt = TRUE; + if (!htab->params->no_tls_get_addr_opt) { struct elf_link_hash_entry *opt, *tga; |