From f9dffbf0863b9010a5eece87bd6b36e38c09ffb0 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 20 Nov 2014 08:52:46 +1030 Subject: 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. --- gold/ChangeLog | 4 ++++ gold/powerpc.cc | 2 ++ 2 files changed, 6 insertions(+) (limited to 'gold') diff --git a/gold/ChangeLog b/gold/ChangeLog index ec76ab9d618..20ace5b8c90 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2014-11-20 Alan Modra + + * powerpc.cc (Target_powerpc::do_relax): Add __go_go to thread_starters. + 2014-11-13 H.J. Lu * x86_64.cc (Target_x86_64::Scan::global): Don't make PLT diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 828bc1674c3..500be1fd0db 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -2720,6 +2720,8 @@ Target_powerpc::do_relax(int pass, "GOMP_parallel_loop_runtime_start", "GOMP_parallel_sections", "GOMP_parallel_sections_start", + /* libgo */ + "__go_go", }; if (parameters->options().shared()) -- cgit v1.2.1