From patchwork Mon Jul 31 10:15:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 9871473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 075C2603B4 for ; Mon, 31 Jul 2017 10:18:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAD6928419 for ; Mon, 31 Jul 2017 10:18:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFB0528564; Mon, 31 Jul 2017 10:18:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5ABB928516 for ; Mon, 31 Jul 2017 10:18:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dc7k4-00014S-22; Mon, 31 Jul 2017 10:16:04 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dc7k2-00014L-Ob for xen-devel@lists.xenproject.org; Mon, 31 Jul 2017 10:16:02 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id 39/AF-03557-2630F795; Mon, 31 Jul 2017 10:16:02 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBIsWRWlGSWpSXmKPExsUSNTvmom4ic32 kwe33zBbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aWLU1sBT3+FT27L7A1MP7w6mLk4mAROMEm sfj9BHYQR0hgA6PE64/vWbsYOTh4BUwlHhyR6mLk5BAWiJKYe+80G4jNJqAtcWDHSRYQW0RAW eLz85XMIDazgK1ES9dnMJtTwF5i5+n7zBAz/zFKPHnzkQ2iqFbi3IcuMJtFQFVi1+6zjBC7BC X+7hAGCUsIaEhsuHmMCcJuY5S4t9puAiPfLCTdsxA6IMKaEq3bf7ND2NoSyxa+Zp4FddH+qyu hbFOJ10c/MkLYihJTuh+yL2BkX8WoXpxaVJZapGuql1SUmZ5RkpuYmaNraGCml5taXJyYnpqT mFSsl5yfu4kRGMoMQLCDcfpl/0OMkhxMSqK8DxjrI4X4kvJTKjMSizPii0pzUosPMcpwcChJ8 M5hAsoJFqWmp1akZeYAowomLcHBoyTCmw6S5i0uSMwtzkyHSJ1i1OV4NeH/NyYhlrz8vFQpcV 4vkCIBkKKM0jy4EbAIv8QoKyXMywh0lBBPQWpRbmYJqvwrRnEORiVh3n8gV/Jk5pXAbXoFdAQ T0BGSpbUgR5QkIqSkGhid6wUVcuuKbrKf7G30j940TzhqRYxeUdtvv3Nb/Wdb3z7peuF83mNj p0TJnw/fnkh61+pyZN/95OdnrU9vFb2b+n/5p9txb170/zKYvv7bo51Pfjaml5ceF7hqo/H/2 U7952v13G5NyeOceKV4zeSH5WU1i1UZz2/ivLJz59SlVfuOi05fdGlvnRJLcUaioRZzUXEiAH +VdD/rAgAA X-Env-Sender: BATV+f5297d26ad76b06bb258+5090+infradead.org+dwmw2@twosheds .srs.infradead.org X-Msg-Ref: server-15.tower-21.messagelabs.com!1501496160!75583127!1 X-Originating-IP: [90.155.92.209] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 65440 invoked from network); 31 Jul 2017 10:16:01 -0000 Received: from twosheds.infradead.org (HELO twosheds.infradead.org) (90.155.92.209) by server-15.tower-21.messagelabs.com with AES256-GCM-SHA384 encrypted SMTP; 31 Jul 2017 10:16:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=twosheds.20170209; h=Mime-Version:Date:Content-Type: References:In-Reply-To:Cc:To:From:Subject:Message-ID:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XB88PVl9yYgKKvcywqZPpNNmvnbQjGi8Nzgb7bA68yU=; b=LurZErBj8pLvwuTUArfyoiYSI L1LMwfEdW8M7+BnwtqZBAzSMLWtEivog5AM4STrChghkRt4YHF+rxbDQULovBK4bl75YRvTO/FsTR ANVoidy1Rsjvk3UL+R92H6YHJA3LegDg/rHk6PeHPexECGuoDI6cEMExg3MRXd9qPrHTi+Qiwk1+i KrBr3Q7URkKX+/sUDmH/z3cbX5H/rAx7otIIiTs27lWOB8jJYezb2HZEUAlLowSxNffDt+dsaqXXs Lq+drdFgfBHxbr9Mc6FJmc71kxhe0EgXgXZHm7Cb6IiR0UT2cfC7gaXej1wc6Uy5t64FjiOcGBmk2 AQ8lN/qTQ==; Received: from [2001:8b0:10b:1:153f:1000:2628:6dbd] by twosheds.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dc7jv-0008Lf-Ow; Mon, 31 Jul 2017 10:15:55 +0000 Message-ID: <1501496155.4771.243.camel@infradead.org> From: David Woodhouse To: Jan Beulich In-Reply-To: <597EFEFA020000780010300D@prv-mh.provo.novell.com> References: <1500564043.4400.15.camel@infradead.org> <597D79BD0200007800102F92@prv-mh.provo.novell.com> <8d36dedc-3cd9-6a75-1c56-ed816185f7bf@citrix.com> <1501456736.4771.219.camel@infradead.org> <597EFEFA020000780010300D@prv-mh.provo.novell.com> Date: Mon, 31 Jul 2017 11:15:55 +0100 Mime-Version: 1.0 X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 X-SRS-Rewrite: SMTP reverse-path rewritten from by twosheds.infradead.org. See http://www.infradead.org/rpr.html Cc: andrew.cooper3@citrix.com, xen-devel@lists.xenproject.org Subject: Re: [Xen-devel] xen/link: Move .data.rel.ro sections into .rodata for final link X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 2017-07-31 at 03:57 -0600, Jan Beulich wrote: > Are there any such relocations? The compiler shouldn't emit data needing > relocation to .rodata, so if at all such might live in assembly code. But yes, > if there are any, things would have been latently broken even before.  $ git diff 33a0b4fe90f1ef1a104dd454c931bb46d417ffca^  $ grep -A36 rodata .xen.efi.0r.S # section .rodata .equ rva_00200000_relocs, 0x00000c .balign 4 .long 0x41b000, rva_0041b000_relocs .word (10 << 12) | 0x920 .word (10 << 12) | 0x928 .word (10 << 12) | 0x930 .word (10 << 12) | 0x938 .word (10 << 12) | 0x940 .word (10 << 12) | 0x948 .word (10 << 12) | 0x950 .word (10 << 12) | 0x958 .word (10 << 12) | 0x960 .word (10 << 12) | 0x968 .word (10 << 12) | 0x970 .word (10 << 12) | 0x978 .word (10 << 12) | 0x980 .word (10 << 12) | 0x988 .word (10 << 12) | 0x990 .word (10 << 12) | 0x998 .word (10 << 12) | 0x9a0 .word (10 << 12) | 0x9a8 .word (10 << 12) | 0x9b0 .word (10 << 12) | 0x9b8 .word (10 << 12) | 0x9c0 .word (10 << 12) | 0x9c8 .word (10 << 12) | 0x9d0 .word (10 << 12) | 0x9d8 .word (10 << 12) | 0x9e0 .word (10 << 12) | 0x9e8 .word (10 << 12) | 0x9f0 .word (10 << 12) | 0x9f8 .word (10 << 12) | 0xa00 .word (10 << 12) | 0xa08 .word (10 << 12) | 0xa10 .word (10 << 12) | 0xa18 # section .init.te diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 93ead6e..aa25dd9 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -194,7 +194,7 @@ $(TARGET).efi: prelink-efi.o $(note_file) efi.lds efi/relocs-dummy.o $(BASEDIR)/         if $(guard) false; then rm -f $@; echo 'EFI support disabled'; \         else $(NM) -pa --format=sysv $(@D)/$(@F) \                 | $(BASEDIR)/tools/symbols --xensyms --sysv --sort >$(@D)/$(@F).map; fi -       rm -f $(@D)/.$(@F).[0-9]* +       #rm -f $(@D)/.$(@F).[0-9]*    efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: $(BASEDIR)/arch/x86/efi/built_in.o  efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o: ; diff --git a/xen/arch/x86/efi/mkreloc.c b/xen/arch/x86/efi/mkreloc.c index bddcce0..55d14a7 100644 --- a/xen/arch/x86/efi/mkreloc.c +++ b/xen/arch/x86/efi/mkreloc.c @@ -346,6 +346,7 @@ int main(int argc, char *argv[])               memcmp(sec1[i].name, ".lockpro", sizeof(sec1[i].name)) == 0 )              continue;   +       printf("# section %.*s\n", (int)sizeof(sec1[i].name), sec1[i].name);          if ( !sec1[i].rva )          {              fprintf(stderr, "Can't handle section %u with zero RVA\n", i);