From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v3 13/23] XENVER_build_id: Provide ld-embedded build-ids (v10) Date: Wed, 24 Feb 2016 15:54:58 -0500 Message-ID: <20160224205458.GA16027@char.us.oracle.com> References: <1455300361-13092-1-git-send-email-konrad.wilk@oracle.com> <1455300361-13092-14-git-send-email-konrad.wilk@oracle.com> <56C381E9.7030002@citrix.com> <20160224185245.GA18149@char.us.oracle.com> <56CE00C7.9000808@citrix.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 1aYgSq-000820-6H for xen-devel@lists.xenproject.org; Wed, 24 Feb 2016 20:55:16 +0000 Content-Disposition: inline In-Reply-To: <56CE00C7.9000808@citrix.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: Andrew Cooper Cc: Wei Liu , Ian Campbell , jinsong.liu@alibaba-inc.com, Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org, mpohlack@amazon.de, ross.lagerwall@citrix.com, Stefano Stabellini , Jan Beulich , xen-devel@lists.xenproject.org, Daniel De Graaf , Keir Fraser , sasha.levin@citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, Feb 24, 2016 at 07:13:11PM +0000, Andrew Cooper wrote: > On 24/02/16 18:52, Konrad Rzeszutek Wilk wrote: > >>> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S > >>> index f501a2f..5cf180f 100644 > >>> --- a/xen/arch/arm/xen.lds.S > >>> +++ b/xen/arch/arm/xen.lds.S > >>> @@ -22,6 +22,9 @@ OUTPUT_ARCH(FORMAT) > >>> PHDRS > >>> { > >>> text PT_LOAD /* XXX should be AT ( XEN_PHYS_START ) */ ; > >>> +#if defined(BUILD_ID) > >>> + note PT_NOTE ; > >>> +#endif > >>> } > >>> SECTIONS > >>> { > >>> @@ -53,6 +56,16 @@ SECTIONS > >>> _erodata = .; /* End of read-only data */ > >>> } :text > >>> > >>> +#if defined(BUILD_ID) > >>> + .note : { > >>> + __note_gnu_build_id_start = .; > >>> + *(.note.gnu.build-id) > >>> + __note_gnu_build_id_end = .; > >>> + *(.note) > >>> + *(.note.*) > >>> + } :text > >>> +#endif > >> This data really should be contained inside rodata. > > I get (I replace :text with :rodata) and got: > > ld: section `.note' assigned to non-existent phdr `rodata' > > > > Which makes sense as there are only two PHDRS. Where you suggesting that > > the .note should be part of the .rodata section? Jan wanted this to be > > in its own section (.note). > > > > Are you suggesting to add another one PHDR? (If so, then mkelf32 has to be modified, > > and for EFI I think it will have to have some #ifdef machinery to make it work). > > I was just suggesting moving _erodata down a little to cover .note Which oddly enough is only in ARM builds. Done! > > Whatever happens patching-wise, this build ID is constant and will want > to remain so. > > ~Andrew