From nobody Mon Feb 9 19:08:11 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1560942296; cv=none; d=zoho.com; s=zohoarc; b=oJpn1eHZCfmOTxvSnZ4FDDrpFBuuonTVEeHTV0L6eP5+tYUQksMvg31q5HAhlvQtf4Dciu1PeH6UpYAbmakJr8Tukgr3ThsoSRkyDzkmfflxq2ZR00vkQRZKiMkQ5V20aV+RRtqMxtgTph824JczRgLPJiKpyjWZD8xf6M4kEVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560942296; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ZjOVGpMPJWObNyNiymIB7LgGxhMov0U1t9GMGbDVhNA=; b=H5SvAAqDDFZt3+izPJ4bArHzAPShtBlNuPNpEchJj27wGKgrTl0qYDBW3kwrAgcrUuc3PoBbBjbq8m+iXZ9S6s/PS6V2OkSpWKix/+AicJVUdGBg7inPqwP3SSIZpDa4KEurVNa6BEZAZvo/wObTMNXtcEw7PPY2D5gdziLc65Y= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1560942296798332.61473574051206; Wed, 19 Jun 2019 04:04:56 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hdYN7-0002GO-0M; Wed, 19 Jun 2019 11:03:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hdYN6-0002G2-6B for xen-devel@lists.xenproject.org; Wed, 19 Jun 2019 11:03:20 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id d6c7aa8a-9281-11e9-8b9e-e730fca96a68; Wed, 19 Jun 2019 11:03:16 +0000 (UTC) X-Inumbo-ID: d6c7aa8a-9281-11e9-8b9e-e730fca96a68 Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: s3qYwPVAMhcqeCgfOHZXYkt2NTaHr+nc17sDNxcEnWQhYueJMlb8eJOpH0BFy0fM4aSPZYOgxZ NGHjQfWvKpfCdyuPXvPuU5UvThqHhAD9hirUFGbnseGdwwJSAHGT/26aUgz9MAjYZcuIhC+C2c JGpx47nMTbnUehUGiur7gy+01jqovJzo/cmzxUXbtO0CC1oU7sfRwuFqOG+qWTquXwux+uAS/i v8oIDvzbAeq2m6fZCWWHUpOHUAXoO16G9KTsB9+Eu79WsZ3L6xkvM/tjyNAHYTzZWqtBP45EU0 I38= X-SBRS: 2.7 X-MesageID: 1941203 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,392,1557201600"; d="scan'208";a="1941203" From: Roger Pau Monne To: Date: Wed, 19 Jun 2019 13:02:49 +0200 Message-ID: <20190619110250.18881-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190619110250.18881-1-roger.pau@citrix.com> References: <20190619110250.18881-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 3/4] x86/linker: add a reloc section to ELF binary X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" If the hypervisor has been built with EFI support (ie: multiboot2). This allows to position the .reloc section correctly in the output binary, or else the linker might place .reloc before the .text section. Note that the .reloc section is moved before .bss for two reasons: in order for the resulting binary to not contain any section with data after .bss, so that the file size can be smaller than the loaded memory size, and because the data it contains is read-only, so it belongs with the other sections containing read-only data. Signed-off-by: Roger Pau Monn=C3=A9 --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu --- xen/arch/x86/xen.lds.S | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 98a99444c2..82103ef1da 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -175,6 +175,14 @@ SECTIONS } :text #endif #endif + +#ifdef XEN_BUILD_EFI + . =3D ALIGN(4); + DECL_SECTION(.reloc) { + *(.reloc) + } :text +#endif + _erodata =3D .; =20 . =3D ALIGN(SECTION_ALIGN); @@ -297,10 +305,6 @@ SECTIONS __2M_rwdata_end =3D .; =20 #ifdef EFI - . =3D ALIGN(4); - DECL_SECTION(.reloc) { - *(.reloc) - } :text /* Trick the linker into setting the image size to exactly 16Mb. */ . =3D ALIGN(__section_alignment__); DECL_SECTION(.pad) { --=20 2.20.1 (Apple Git-117) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel