This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [gomp4] Add tables generation


On 05/08/2014 12:11 PM, Bernd Schmidt wrote:
On 05/06/2014 05:32 PM, Ilya Verbin wrote:
On 05 Apr 17:22, Bernd Schmidt wrote:
Things seemed to work over here, but now I'm not certain whether the
__start_/__stop_ functionality is GNU ld specific? Maybe we should
just go back to the previous version of this patch which didn't try
to use this.

Bernd

This approach does not work with shared libraries.

The automatically inserted symbols have GLOBAL binding, therefore the
__start_/__stop_ from the executable overwrite the respective symbols
in DSO.

Ok, I guess we should just go back to what we had previously. Here's
what I intend to commit if there are no objections.

... plus the following to make it work with the changed section names.


Bernd


Index: libgcc/ompstuff.c
===================================================================
--- libgcc/ompstuff.c	(revision 432834)
+++ libgcc/ompstuff.c	(working copy)
@@ -44,10 +44,10 @@ see the files COPYING3 and COPYING.RUNTI
 #if defined(HAVE_GAS_HIDDEN) && defined(ENABLE_OFFLOADING)
 void *_omp_func_table[0]
   __attribute__ ((__used__, visibility ("hidden"),
-		  section (".offload_func_table_section"))) = { };
+		  section ("__gnu_offload_funcs"))) = { };
 void *_omp_var_table[0]
   __attribute__ ((__used__, visibility ("hidden"),
-		  section (".offload_var_table_section"))) = { };
+		  section ("__gnu_offload_vars"))) = { };
 #endif
 
 #elif defined CRT_END
@@ -55,10 +55,10 @@ void *_omp_var_table[0]
 #if defined(HAVE_GAS_HIDDEN) && defined(ENABLE_OFFLOADING)
 void *_omp_funcs_end[0]
   __attribute__ ((__used__, visibility ("hidden"),
-		  section (".offload_func_table_section"))) = { };
+		  section ("__gnu_offload_funcs"))) = { };
 void *_omp_vars_end[0]
   __attribute__ ((__used__, visibility ("hidden"),
-		  section (".offload_var_table_section"))) = { };
+		  section ("__gnu_offload_vars"))) = { };
 extern void *_omp_func_table[];
 extern void *_omp_var_table[];
 void *__OPENMP_TARGET__[] __attribute__ ((__visibility__ ("hidden"))) =

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