This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Default powerpc64 to --plt-thread-safe for Go
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 20 Nov 2014 08:55:44 +1030
- Subject: Default powerpc64 to --plt-thread-safe for Go
- Authentication-results: sourceware.org; auth=none
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.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 0b65ab1..901a88d 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -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;
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 828bc16..500be1f 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -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())
--
Alan Modra
Australia Development Lab, IBM