From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CF2481A1E3D for ; Mon, 1 Aug 2016 07:56:54 -0700 (PDT) Received: by mail-io0-x233.google.com with SMTP id 38so185337650iol.0 for ; Mon, 01 Aug 2016 07:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ZQiQm4ZAYlyCINDC/gJRCqgKIC8t2KQly8cLlUrC9Hs=; b=fskpo2rOftK2XL3iAC5rPU5fSf5FTCL5r+w5XyUFgG4TpiFVXxjvsu1xQxq3TATwSm FZi/+q3wovUqAPEzgGkTxN8vklI0yhVnQEBrQNbkG6eW9nE/F7jNJvQSQBhdVWM87tAk AathIfAgrrX8H9QnA9WSU7tnq2XZ8ojboIEck= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZQiQm4ZAYlyCINDC/gJRCqgKIC8t2KQly8cLlUrC9Hs=; b=gGYUMZGPC5EMlis2Zeo+4zZ2PQGIUtgwZXfx+Hy1ULY1LkVbO/ppKbnDTsnG9FoXNW vI/tS2ITNNtyrR0b4CmMCg+Rcq48PekYCFW52/bM/XRhcuK8I3FlaipUaMiA8pLwS5FX erV15J80Pjm3SVy2BXTki0xS4AlRAQEkPTOhy9ysZbJAmCKkCmiS8heUNfIjvwpjJocK P25fySWiaZqSoJnuGVwYBDn91/vWBnM7IHEx/LRS0uamC4ChyHU64+IdexSTUSdd4pYB sIc4VGpHpaETyCFKJf5lpBv/TgVkhhxbFDVh9BmLYvp3+2ixUhtZtmqz0juc49rLsRkx QMNw== X-Gm-Message-State: AEkoouv/eJFaYH6o5x5W3VGr8MOB1nTgGUXin4HqvhEpuCnPPN1uZ2nqxn1cSwkDGCVc0smdby6XxVMQAG1vZe8Q X-Received: by 10.107.40.133 with SMTP id o127mr54434342ioo.183.1470063414195; Mon, 01 Aug 2016 07:56:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Mon, 1 Aug 2016 07:56:53 -0700 (PDT) In-Reply-To: References: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org> <1470038497-2536-8-git-send-email-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A1155E30DE@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Mon, 1 Aug 2016 16:56:53 +0200 Message-ID: To: "Gao, Liming" Cc: "Shi, Steven" , "Zhu, Yonghong" , "Justen, Jordan L" , "edk2-devel@lists.01.org" , "lersek@redhat.com" , "leif.lindholm@linaro.org" Subject: Re: [PATCH v5 7/8] MdePkg GCC/X64: avoid 'hidden' visibility for module entry points X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 14:56:55 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 1 August 2016 at 16:49, Ard Biesheuvel wrote= : > On 1 August 2016 at 16:18, Gao, Liming wrote: >> Ard: >> I don't think it is good way to define GCC_VISIBILITY_PROTECTED and ap= ply it in EntryPointLib. We only need to expose _ModuleEntryPoint. It has b= een specified in LINK_FLAGS in tools_def.txt. Could we also specify its att= ribute in CC_FLAGS or LINK_FLAGS in tools_def.txt? >> > > It seems this does the trick as well > > diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.ld= s > index 281af8a9bd33..02387d4f8d6f 100644 > --- a/BaseTools/Scripts/GccBase.lds > +++ b/BaseTools/Scripts/GccBase.lds > @@ -80,3 +80,7 @@ SECTIONS { > *(COMMON) > } > } > + > +VERSION { > + { global: _ModuleEntryPoint*; }; > +}; > > > Note that * at the end: this is necessary since _ModuleEntryPoint will > be called _ModuleEntryPoint.lto_priv.xxx in the LTO objects. > Hmm, looks like I spoke too soon. I don't know what I did wrong, but this does not actually work. --=20 Ard.