From: Alan Modra Date: Wed, 19 Nov 2014 22:22:46 +0000 (+1030) Subject: Default powerpc64 to --plt-thread-safe for Go X-Git-Tag: binutils-2_25~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=240f0ba1b9f06ce951dfcc9307d91c3c903496a4;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f5ee80c421a..8ac4034d549 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2014-11-20 Alan Modra + + * elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters. + 2014-11-18 Igor Zamyatin * elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 0b65ab19cba..901a88d9232 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/ChangeLog b/gold/ChangeLog index 88dd58f5d1e..b3f7c36c775 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-10-28 Alan Modra Apply trunk patches 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())