From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel De Graaf Subject: Re: [PATCH v3 13/23] XENVER_build_id: Provide ld-embedded build-ids (v10) Date: Fri, 12 Feb 2016 16:52:53 -0500 Message-ID: <56BE5435.2080904@tycho.nsa.gov> References: <1455300361-13092-1-git-send-email-konrad.wilk@oracle.com> <1455300361-13092-14-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aULem-0000On-TQ for xen-devel@lists.xenproject.org; Fri, 12 Feb 2016 21:53:41 +0000 In-Reply-To: <1455300361-13092-14-git-send-email-konrad.wilk@oracle.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: Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, andrew.cooper3@citrix.com, konrad@kernel.org, mpohlack@amazon.de, ross.lagerwall@citrix.com, sasha.levin@citrix.com, jinsong.liu@alibaba-inc.com, Ian Jackson , Stefano Stabellini , Ian Campbell , Wei Liu , Stefano Stabellini , Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 12/02/16 13:05, Konrad Rzeszutek Wilk wrote: > The mechanism to get this is via the XENVER hypercall and > we add a new sub-command to retrieve the binary build-id > called XENVER_build_id. The sub-hypercall parameter > allows an arbitrary size (the buffer and len is provided > to the hypervisor). A NULL parameter will probe the hypervisor > for the length of the build-id. > > One can also retrieve the value of the build-id by doing > 'readelf -n xen-syms'. > > For EFI builds we re-use the same build-id that the xen-syms > was built with. > > The version of ld that first implemented --build-id is v2.18. > Hence we check for that or later version - if older version > found we do not build the hypervisor with the build-id > (and the return code is -ENODATA for that case). > > For x86 we have two binaries - the xen-syms and the xen - an > smaller version with lots of sections removed. To make it possible > for readelf -n xen we also modify mkelf32 and xen.lds.S to include > the PT_NOTE ELF section. > > The EFI binary is more complicated. Having any non-recognizable > sections (.note, .data.note, etc) causes the boot to hang. > Moving the .note in the .data section makes it work. It is also > worth noting that the PE/COFF does not have any "comment" > sections to the author. > > Suggested-by: Andrew Cooper > Signed-off-by: Martin Pohlack > Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Daniel De Graaf