summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-10-21 17:06:01 +1030
committerAlan Modra <amodra@gmail.com>2014-10-28 16:53:13 +1030
commit334efb9a97018d8b2f508e5c22e5acb7b824cc76 (patch)
tree3f3d3bcdfec3e8125803c518e489da55023139fa
parent35ac6b6a54f9be85dd9794fa6645fac3631e510b (diff)
downloadbinutils-334efb9a97018d8b2f508e5c22e5acb7b824cc76.tar.gz
binutils-334efb9a97018d8b2f508e5c22e5acb7b824cc76.tar.bz2
binutils-334efb9a97018d8b2f508e5c22e5acb7b824cc76.zip
Add gcc-4.9 libgomp symbols requiring --plt-thread-safe for power7
powerpc64 ld builds plt call stubs with a read barrier to provide thread safety on lazy plt updates, necessary on multi-threaded apps with power7 or later weakly ordered memory. gcc-4.9 libgomp introduced more functions that could call pthread_create, which means we have more functions that if referenced in an executable should cause a default of --plt-thread-safe. bfd/ * elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions to thread_starter. gold/ * powerpc.cc (do_relax): Add gcc-4.9 libgomp functions to thread_starter.
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf64-ppc.c6
-rw-r--r--gold/ChangeLog7
-rw-r--r--gold/powerpc.cc6
4 files changed, 23 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9e32bc616da..35cc99142c3 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,10 @@
2014-10-28 Alan Modra <amodra@gmail.com>
Apply trunk patches
+ 2014-10-21 Alan Modra <amodra@gmail.com>
+ * elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
+ to thread_starter.
+
2014-10-18 Alan Modra <amodra@gmail.com>
* elf64-ppc.c (ppc64_elf_add_symbol_hook): If function code
section for function symbols defined in .opd is discarded, let
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index efd86a2ac75..e3c06eb00b4 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11964,11 +11964,17 @@ ppc64_elf_size_stubs (struct bfd_link_info *info)
/* libanl */
"getaddrinfo_a",
/* libgomp */
+ "GOMP_parallel",
"GOMP_parallel_start",
+ "GOMP_parallel_loop_static",
"GOMP_parallel_loop_static_start",
+ "GOMP_parallel_loop_dynamic",
"GOMP_parallel_loop_dynamic_start",
+ "GOMP_parallel_loop_guided",
"GOMP_parallel_loop_guided_start",
+ "GOMP_parallel_loop_runtime",
"GOMP_parallel_loop_runtime_start",
+ "GOMP_parallel_sections",
"GOMP_parallel_sections_start",
};
unsigned i;
diff --git a/gold/ChangeLog b/gold/ChangeLog
index f636afa890b..88dd58f5d1e 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
+2014-10-28 Alan Modra <amodra@gmail.com>
+
+ Apply trunk patches
+ 2014-10-22 Alan Modra <amodra@gmail.com>
+ * powerpc.cc (do_relax): Add gcc-4.9 libgomp functions to
+ thread_starter.
+
2014-09-30 Cary Coutant <ccoutant@google.com>
PR gold/17432
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 0a9ab7d0d5c..828bc1674c3 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -2708,11 +2708,17 @@ Target_powerpc<size, big_endian>::do_relax(int pass,
/* libanl */
"getaddrinfo_a",
/* libgomp */
+ "GOMP_parallel",
"GOMP_parallel_start",
+ "GOMP_parallel_loop_static",
"GOMP_parallel_loop_static_start",
+ "GOMP_parallel_loop_dynamic",
"GOMP_parallel_loop_dynamic_start",
+ "GOMP_parallel_loop_guided",
"GOMP_parallel_loop_guided_start",
+ "GOMP_parallel_loop_runtime",
"GOMP_parallel_loop_runtime_start",
+ "GOMP_parallel_sections",
"GOMP_parallel_sections_start",
};