This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4] Add tables generation
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Ilya Verbin <iverbin at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Michael Zolotukhin <michael dot v dot zolotukhin at gmail dot com>
- Date: Mon, 12 May 2014 22:43:51 +0200
- Subject: Re: [gomp4] Add tables generation
- Authentication-results: sourceware.org; auth=none
- References: <532B1C45 dot 9020308 at codesourcery dot com> <20140320185619 dot GN1817 at tucnak dot redhat dot com> <532C5729 dot 5050101 at codesourcery dot com> <20140321152053 dot GS1817 at tucnak dot redhat dot com> <533E7BC9 dot 8000504 at codesourcery dot com> <87lhvjhl6e dot fsf at kepler dot schwinge dot homeip dot net> <53401FA1 dot 2060407 at codesourcery dot com> <20140506153204 dot GA13875 at msticlxl57 dot ims dot intel dot com> <536B5835 dot 8040002 at codesourcery dot com>
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"))) =