From nobody Sun Dec 22 02:18:23 2024 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1727369710; cv=none; d=zohomail.com; s=zohoarc; b=YjHdwonVLR3UTakZD2mHiMVYmRTUH1K5GV6siOQwEOYgJJclZps6M7BuHJ/Ir2fsrQATh4YCQWG5J9MDzF612QIZZTb9aJUrcaOF3yj0dAVCT0vKBKhLfpoh4dftb5pLbuAKXAsyT2foSuStvxpp86uNvK9lCoIYIx2RLW+1HhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727369710; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=tyQZLVu1mMzTaGyKX8oda+NFy3jMOBImmEzHcbevgZ0=; b=hc+mHdo8weUpibxkdSZgcnPQiKgnDWu//kCQMXtwmOY6reMHG4gtxrEFaEkEpqVKxsMBCxcMRjtW12pLMRqtKPmZnslTtPtuXgnKWbzZhvakkpd44294Gzgg65F+897bJY85cwCP6WphqmkzRKX/xtW2AU7ArXUczmAxPvwtqjs= 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=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1727369710357251.14970355980608; Thu, 26 Sep 2024 09:55:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.805751.1216949 (Exim 4.92) (envelope-from ) id 1strlB-0001W5-Pr; Thu, 26 Sep 2024 16:54:33 +0000 Received: by outflank-mailman (output) from mailman id 805751.1216949; Thu, 26 Sep 2024 16:54:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1strlB-0001Vm-My; Thu, 26 Sep 2024 16:54:33 +0000 Received: by outflank-mailman (input) for mailman id 805751; Thu, 26 Sep 2024 16:54:32 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1strlA-0001SU-Hb for xen-devel@lists.xenproject.org; Thu, 26 Sep 2024 16:54:32 +0000 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [2a00:1450:4864:20::62f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 001742f4-7c28-11ef-a0ba-8be0dac302b0; Thu, 26 Sep 2024 18:54:31 +0200 (CEST) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a8d6ac24a3bso231486066b.1 for ; Thu, 26 Sep 2024 09:54:31 -0700 (PDT) Received: from fedora.. ([94.75.70.14]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2979e00sm16981566b.158.2024.09.26.09.54.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 09:54:29 -0700 (PDT) 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: 001742f4-7c28-11ef-a0ba-8be0dac302b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727369671; x=1727974471; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tyQZLVu1mMzTaGyKX8oda+NFy3jMOBImmEzHcbevgZ0=; b=PB8EpGCXAXXY7Yv7vp9W75XsX0eSCfdE5A8/mRX9zh628uc6bDJRV7ATEEUu3uKmIn 3CP0UeojdDB20q1BoOkaYJ+nTSvug43Efcvc6w981oaAjsCjVFCreES2oZCSsC6K17og l7VkC3uNDxIQdkr/uFf3sHwjNSp/zAzOYBzfvKoavuPUEkN8fjSi521fhwD8YGAbmxnG OWiybuYZIfYHRJBjxbshMaCdJudGgSRi+sO42sFNZ6VghQwyluZ9egyti6j2dcd37nCI YxHAv3uewwApSyUpB7lYKVCO8OkhZO6GqzEfSsaRZKjsEmP3buzKgyXQrVEvOOBzLwZT 8SUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727369671; x=1727974471; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tyQZLVu1mMzTaGyKX8oda+NFy3jMOBImmEzHcbevgZ0=; b=U0KEtVneaTLxtoKHhjfTmrqaI0EqRji9kUpWIX0hSmfSPvvIIjZKiP3I1Ct2OWWX44 YsSphUr9LhzuUSCfzDlUwqM7f11GIpS7BrysqUPx3VmeiNZUqU1a7Vbtcwy5WxRqkK2o a9gqeO8Wdn9+wdmJjuT1GjK+gXSLbIEtG5a3/HOB0Bnptg1J2BWQS/kVL/cifKadGjtl E4snBZDvePKEODZdSzz7RJ2FKOZtUZ+1F5w9uE5ipl3FRZxOqyp/Xpn9Hve8d6+rFZNf GTrNrlwYeTxwSgiGN6zdpfUHS/zsLTxfChNdrvre9z5wcn3ek4oyFV5TGFwpiWOa9m+G aT6Q== X-Gm-Message-State: AOJu0Yxd9LqxJAItrNw4nV66bH16HyEAtFF1YYKBlEIczuWXibLDChEs nKOCNtDDIaYpMRLXzJqBDvBqsB+FJFoU+ZkeED+K7/rvUsUjXtheuH/bTg== X-Google-Smtp-Source: AGHT+IGO7LzsF8sL7T87A5FWyFu7zhWF2lc2XGmHrBVsJ9IfeJqByhupnamafALDKTWao2T7nT6fTg== X-Received: by 2002:a17:906:4fd2:b0:a7a:afe8:1013 with SMTP id a640c23a62f3a-a93c3094cbbmr61577066b.1.1727369670418; Thu, 26 Sep 2024 09:54:30 -0700 (PDT) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Julien Grall , Stefano Stabellini Subject: [PATCH v4 1/6] xen: introduce SIMPLE_DECL_SECTION Date: Thu, 26 Sep 2024 18:54:20 +0200 Message-ID: <413dfb16280c3ec541df8775d31902a4b12a64fe.1727365854.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1727369710995116600 Content-Type: text/plain; charset="utf-8" Introduce SIMPLE_DECL_SECTION to cover the case when an architecture wants to declare a section without specifying of load address for the section. Update x86/xen.lds.S to use SIMPLE_DECL_SECTION. Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- Changes in V4: - new patch --- xen/arch/x86/xen.lds.S | 6 ++++-- xen/include/xen/xen.lds.h | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index b60d2f0d82..9275a566e1 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -3,6 +3,10 @@ =20 #include #include + +#ifdef EFI +#define SIMPLE_DECL_SECTION +#endif #include #include #undef ENTRY @@ -12,9 +16,7 @@ =20 #define FORMAT "pei-x86-64" #undef __XEN_VIRT_START -#undef DECL_SECTION #define __XEN_VIRT_START __image_base__ -#define DECL_SECTION(x) x : =20 ENTRY(efi_start) =20 diff --git a/xen/include/xen/xen.lds.h b/xen/include/xen/xen.lds.h index 24b8900ffe..8135732756 100644 --- a/xen/include/xen/xen.lds.h +++ b/xen/include/xen/xen.lds.h @@ -5,6 +5,8 @@ * Common macros to be used in architecture specific linker scripts. */ =20 +#ifndef SIMPLE_DECL_SECTION + /* * Declare a section whose load address is based at PA 0 rather than * Xen's virtual base address. @@ -15,6 +17,10 @@ # define DECL_SECTION(x) x : AT(ADDR(x) - __XEN_VIRT_START) #endif =20 +#else /* SIMPLE_DECL_SECTION */ +#define DECL_SECTION(x) x : +#endif + /* * To avoid any confusion, please note that the EFI macro does not corresp= ond * to EFI support and is used when linking a native EFI (i.e. PE/COFF) bin= ary, --=20 2.46.1