From nobody Mon Feb 9 00:56:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1617270329; cv=none; d=zohomail.com; s=zohoarc; b=dvJTtHjwX+byCL3VGo963JpTVMnBfX8wd0cEUKAXQbp4yNRokV+iBeeBsoDzdd8/5wivTzHb0wx9kCpmnWUqt+USI0EBp1SkFv5FcHJj0U4pnoIZOCltM+oo94/x9kBZQmr7d0aYs2CjtHZOaICXPYmRY7E3psWZ0WRU2G3TGY4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617270329; 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; bh=zGF5/no4yyDySevuLNlCcruxFje6e6BtvrRRyJsweIc=; b=aQOQR2b41qPnQtRwoojSFGTHrbv5SysyxOs0gGeyuYemvt42A+Eo0YeQzN+baf3s+18YrGimV9wjuJ9I41p6SEMOLtyxwGGE4GmCZDAqWacT6iR7o6M3oCVN7O1nfVh4FMVRTvoTG+8yeWwBpPKRjC1L3/bxYnfGKmMGr8pf/8c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1617270329118420.4682289698627; Thu, 1 Apr 2021 02:45:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.104230.199110 (Exim 4.92) (envelope-from ) id 1lRtt2-0004cl-Vj; Thu, 01 Apr 2021 09:45:12 +0000 Received: by outflank-mailman (output) from mailman id 104230.199110; Thu, 01 Apr 2021 09:45:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lRtt2-0004cc-Ru; Thu, 01 Apr 2021 09:45:12 +0000 Received: by outflank-mailman (input) for mailman id 104230; Thu, 01 Apr 2021 09:45:11 +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.92) (envelope-from ) id 1lRtt1-0004cP-P5 for xen-devel@lists.xenproject.org; Thu, 01 Apr 2021 09:45:11 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id fdc01e63-a97f-4d35-a452-27dddd54c2a6; Thu, 01 Apr 2021 09:45:10 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 25BD5AEC2; Thu, 1 Apr 2021 09:45:10 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fdc01e63-a97f-4d35-a452-27dddd54c2a6 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617270310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zGF5/no4yyDySevuLNlCcruxFje6e6BtvrRRyJsweIc=; b=QUl1VmTsvmGOtkCxbMHlKH6XDNRr9b7AwnLSaHzocfueemup8rnq/nu2jKjyszFeQrYutJ SNbJT0+x7uqF1oj9w54L+o8q/r+E8kMivj2Flaicqsdws1y3n5zm31BM/OcOUyyxXZN7j3 lkLiPaFKQGTkXhj/dR9EGEPor/nN7T8= Subject: [PATCH 3/8] x86/EFI: program headers are an ELF concept From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: Message-ID: <017478f9-76d2-4dc4-de93-b662c4552968@suse.com> Date: Thu, 1 Apr 2021 11:45:09 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) Content-Type: text/plain; charset="utf-8" While they apparently do no harm when building xen.efi, their use is potentially misleading. Conditionalize their use to be for just the ELF binary we produce. No change to the resulting binaries. Signed-off-by: Jan Beulich --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -34,13 +34,19 @@ OUTPUT_FORMAT(FORMAT, FORMAT, FORMAT) =20 OUTPUT_ARCH(i386:x86-64) =20 +#ifndef EFI PHDRS { text PT_LOAD ; -#if (defined(BUILD_ID) || defined (CONFIG_PVH_GUEST)) && !defined(EFI) +#if defined(BUILD_ID) || defined(CONFIG_PVH_GUEST) note PT_NOTE ; #endif } +#define PHDR(x) :x +#else +#define PHDR(x) +#endif + SECTIONS { #if !defined(EFI) @@ -83,7 +89,7 @@ SECTIONS *(.text.kexec) *(.gnu.warning) _etext =3D .; /* End of text section */ - } :text =3D 0x9090 + } PHDR(text) =3D 0x9090 =20 . =3D ALIGN(SECTION_ALIGN); __2M_text_end =3D .; @@ -134,7 +140,7 @@ SECTIONS *(SORT(.data.vpci.*)) __end_vpci_array =3D .; #endif - } :text + } PHDR(text) =20 #if defined(CONFIG_PVH_GUEST) && !defined(EFI) DECL_SECTION(.note.Xen) { @@ -160,7 +166,7 @@ SECTIONS __note_gnu_build_id_start =3D .; *(.buildid) __note_gnu_build_id_end =3D .; - } :text + } #endif #endif =20 @@ -260,7 +266,7 @@ SECTIONS *(SORT(.data.vpci.*)) __end_vpci_array =3D .; #endif - } :text + } PHDR(text) =20 . =3D ALIGN(SECTION_ALIGN); __init_end =3D .; @@ -281,7 +287,7 @@ SECTIONS *(.data.paramhypfs) __paramhypfs_end =3D .; #endif - } :text + } PHDR(text) =20 DECL_SECTION(.data) { *(.data.page_aligned) @@ -289,7 +295,7 @@ SECTIONS *(.data.rel) *(.data.rel.*) CONSTRUCTORS - } :text + } PHDR(text) =20 DECL_SECTION(.bss) { __bss_start =3D .; @@ -306,7 +312,7 @@ SECTIONS *(.bss) . =3D ALIGN(POINTER_ALIGN); __bss_end =3D .; - } :text + } PHDR(text) _end =3D . ; =20 . =3D ALIGN(SECTION_ALIGN); @@ -316,12 +322,12 @@ SECTIONS . =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) { . =3D ALIGN(MB(16)); - } :text + } #endif =20 #ifndef XEN_BUILD_EFI