From patchwork Mon May 12 20:43:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 348112 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 37F3C14007F for ; Tue, 13 May 2014 06:44:12 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=YsYLnmOwQslOP8QeK 1VQvG6GTlR4rS1iTusuZEBnV2rvxphnnVSRtZPMrWG2bektNWhfAb0OjrDtgOrfD l1jsT4oqrzW1XkceAegx+/6ZDHzBFxaeTUtKdACNVs9ULoPfbYnTpYDvGnjo863D 1FbVzDqUdGKthMJVcsUrXJ1Sag= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=R0h0c0ZuB0d43q8tYxsy741 gJXY=; b=ZmvekVzpfPRwc8n1v3iLpSaSgYJkHF6uYr70GJFNzITQgJx88LxKdnn Yuf5KC09J0hJTF/WV1fveI7zCNzBBADNxBoQjsddqwXtpK+CrvDwScXEhAoivFvn wT290eyE7RucWpBCrXzW5QAohUH8DbpiQ35Nz1qQIXAmFFKaZ8rQ= Received: (qmail 16685 invoked by alias); 12 May 2014 20:44:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 16674 invoked by uid 89); 12 May 2014 20:44:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 May 2014 20:44:02 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wjx4n-0003HF-QM from Bernd_Schmidt@mentor.com ; Mon, 12 May 2014 13:43:57 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 12 May 2014 13:43:57 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Mon, 12 May 2014 21:43:55 +0100 Message-ID: <53713287.7040805@codesourcery.com> Date: Mon, 12 May 2014 22:43:51 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Ilya Verbin , Jakub Jelinek CC: Thomas Schwinge , GCC Patches , Michael Zolotukhin Subject: Re: [gomp4] Add tables generation References: <532B1C45.9020308@codesourcery.com> <20140320185619.GN1817@tucnak.redhat.com> <532C5729.5050101@codesourcery.com> <20140321152053.GS1817@tucnak.redhat.com> <533E7BC9.8000504@codesourcery.com> <87lhvjhl6e.fsf@kepler.schwinge.homeip.net> <53401FA1.2060407@codesourcery.com> <20140506153204.GA13875@msticlxl57.ims.intel.com> <536B5835.8040002@codesourcery.com> In-Reply-To: <536B5835.8040002@codesourcery.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"))) =