From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Kiper Subject: Re: [PATCH v2 02/23] x86/boot: copy only text section from *.lnk file to *.bin file Date: Tue, 21 Jul 2015 19:23:55 +0200 Message-ID: <20150721172355.GJ3479@olila.local.net-space.pl> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-3-git-send-email-daniel.kiper@oracle.com> <55AE2E6B02000078000938BD@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZHbHT-0003r4-Qk for xen-devel@lists.xenproject.org; Tue, 21 Jul 2015 17:24:39 +0000 Content-Disposition: inline In-Reply-To: <55AE2E6B02000078000938BD@prv-mh.provo.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: andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, Jul 21, 2015 at 03:35:07AM -0600, Jan Beulich wrote: > >>> On 20.07.15 at 16:28, wrote: > > Without any explanation (description) I'm inclined to say this makes > things more fragile instead of improving the situation. As it looks > like we indeed pointlessly copy .eh_frame, but I think this would > better be avoided by suppressing its generation (i.e. add > -fno-asynchronous-unwind-tables just like Rules.mk has). Make sense, however, there is still place for two small optimizations. First of all ld generates .got.plt section and objcopy copy it to binary file. It is not needed because we do not link our stuff here with shared libraries. So, we can use -R objcopy option to remove it (if you do not like -j .text). This way we could save 15 bytes (at least on my machines). We could also save another 3 bytes (per one xen/arch/x86/boot C input file) in final Xen binary in worst case :-))). We just need generate output assembly files as string of .byte instead of .long. Where should I stop? Daniel