This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add gcc-4.9 libgomp symbols requiring --plt-thread-safe for power7

Found when investigating some intermittent mainline gcc libgomp test

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.

	* elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
	to thread_starter.

diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index efd86a2..e3c06eb 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 */
 	  /* libgomp */
+	  "GOMP_parallel",
+	  "GOMP_parallel_loop_static",
+	  "GOMP_parallel_loop_dynamic",
+	  "GOMP_parallel_loop_guided",
+	  "GOMP_parallel_loop_runtime",
+	  "GOMP_parallel_sections",
       unsigned i;

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]