diff mbox

[gomp4] Add tables generation

Message ID 53713287.7040805@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt May 12, 2014, 8:43 p.m. UTC
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
diff mbox

Patch

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"))) =