Default powerpc64 to --plt-thread-safe for Go

Go is multi-threaded, so use thread-safe plt stubs.  __go_go doesn't
actually start threads, but is a convenient libgo function with a
reasonably unique name that is called by all Go executables.  (Threads
are started by a static function of libgo, runtime_newosproc, called
by a whole lot of global functions, including runtime_starttheworld
and runtime_main.)

bfd/
	* elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
gold/
	* powerpc.cc (Target_powerpc::do_relax): Add __go_go to thread_starters.
This commit is contained in:
Alan Modra 2014-11-20 08:52:46 +10:30
parent 3f9034c204
commit f9dffbf086
4 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2014-11-20 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
2014-11-18 H.J. Lu <hongjiu.lu@intel.com>
PR ld/17618

View File

@ -11979,6 +11979,8 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
"GOMP_parallel_loop_runtime_start",
"GOMP_parallel_sections",
"GOMP_parallel_sections_start",
/* libgo */
"__go_go",
};
unsigned i;

View File

@ -1,3 +1,7 @@
2014-11-20 Alan Modra <amodra@gmail.com>
* powerpc.cc (Target_powerpc::do_relax): Add __go_go to thread_starters.
2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
* x86_64.cc (Target_x86_64<size>::Scan::global): Don't make PLT

View File

@ -2720,6 +2720,8 @@ Target_powerpc<size, big_endian>::do_relax(int pass,
"GOMP_parallel_loop_runtime_start",
"GOMP_parallel_sections",
"GOMP_parallel_sections_start",
/* libgo */
"__go_go",
};
if (parameters->options().shared())