aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-01-15 06:13:26 +0000
committerAlan Modra <amodra@gmail.com>2013-01-15 06:13:26 +0000
commite24587436538578f3ee2dc671a8a619dd7a3f0bd (patch)
tree15f32d99a1c9191ab4b8432adc32e3a7f38f48fd /gold
parent4d490e4206b627b899f9791efbc3e602b2cb4c5f (diff)
downloadgdb-e24587436538578f3ee2dc671a8a619dd7a3f0bd.zip
gdb-e24587436538578f3ee2dc671a8a619dd7a3f0bd.tar.gz
gdb-e24587436538578f3ee2dc671a8a619dd7a3f0bd.tar.bz2
bfd/
* elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to plt-thread-safe. gold/ * powerpc.cc (Target_powerpc::do_relax): Default shared libs to plt-thread-safe. ld/testsuite/ * ld-powerpc/tlsso.d: Adjust for plt-thread-safe stubs. * ld-powerpc/tlsso.g: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlstocso.d: Likewise. * ld-powerpc/tlstocso.g: Likewise.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/powerpc.cc23
2 files changed, 20 insertions, 8 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index cb6ec9e..f5969f0 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,10 @@
2013-01-15 Alan Modra <amodra@gmail.com>
+ * powerpc.cc (Target_powerpc::do_relax): Default shared libs to
+ plt-thread-safe.
+
+2013-01-15 Alan Modra <amodra@gmail.com>
+
* testsuite/Makefile.am (final_layout_script.lds): Handle .got section.
* testsuite/Makefile.in: Regenerate.
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 2a2277c..26ae337 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -2182,7 +2182,7 @@ Target_powerpc<size, big_endian>::do_relax(int pass,
bool thread_safe = parameters->options().plt_thread_safe();
if (size == 64 && !parameters->options().user_set_plt_thread_safe())
{
- const char* const thread_starter[] =
+ static const char* const thread_starter[] =
{
"pthread_create",
/* libstdc++ */
@@ -2201,14 +2201,21 @@ Target_powerpc<size, big_endian>::do_relax(int pass,
"GOMP_parallel_sections_start",
};
- for (unsigned int i = 0;
- i < sizeof(thread_starter) / sizeof(thread_starter[0]);
- i++)
+ if (parameters->options().shared())
+ thread_safe = true;
+ else
{
- Symbol* sym = symtab->lookup(thread_starter[i], NULL);
- thread_safe = sym != NULL && sym->in_reg() && sym->in_real_elf();
- if (thread_safe)
- break;
+ for (unsigned int i = 0;
+ i < sizeof(thread_starter) / sizeof(thread_starter[0]);
+ i++)
+ {
+ Symbol* sym = symtab->lookup(thread_starter[i], NULL);
+ thread_safe = (sym != NULL
+ && sym->in_reg()
+ && sym->in_real_elf());
+ if (thread_safe)
+ break;
+ }
}
}
this->plt_thread_safe_ = thread_safe;