From: Ian Campbell Subject: Re: [PATCH V2 01/12] Create efi-shared.[ch], and move string functions Date: Mon, 28 Jul 2014 16:56:16 +0100 Message-ID: <1406562976.17854.8.camel@kazak.uk.xensource.com> References: <1405989815-25236-1-git-send-email-roy.franz@linaro.org> <1405989815-25236-2-git-send-email-roy.franz@linaro.org> <53CFFF74020000780002540C@mail.emea.novell.com> <1406562064.17854.1.camel@kazak.uk.xensource.com> <53D68DD70200007800026C29@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53D68DD70200007800026C29@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: keir@xen.org, tim@xen.org, xen-devel@lists.xen.org, Roy Franz , stefano.stabellini@citrix.com, linaro-uefi@lists.linaro.org, fu.wei@linaro.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-07-28 at 16:52 +0100, Jan Beulich wrote: > >> This would also address the > >> tool chain detection issue you described in the cover letter (without > >> the addressing of which I can't see how things will ultimately work). > > > > In the case where the toolchain doesn't EFI won't the unnecessary code > > built in xen/common/efi simply get discarded by the linker? > > Not that I'm aware of - afaik no code or data inside a .o would > ever get thrown away by the linker without it being specifically > asked to do so. Hrm perhaps I'm thinking of one of the whole programmer optimisation things then. > > > Even if not it looks like ~20K of mostly __init stuff, which doesn't > > seem like the end of the world, especially given that more and more > > toolstacks do support EFI with time. > > Right now - with the runtime code not moved over yet - it's > mostly __init. Plus (with the linker not being able to discard that > code) it carries the risk of having references to symbols that > don't exist in the non-EFI build. Perhaps we can put the relevant code into efi specific sections and DTRT in xen.lds.S? Ian.