From nobody Sun Feb 8 08:52:32 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=reject dis=none) header.from=cloud.com ARC-Seal: i=1; a=rsa-sha256; t=1730818541; cv=none; d=zohomail.com; s=zohoarc; b=cEXllozSlxtv3uW42CQiH0m+EQxTcO1F6jo/foggui4eblaO4hLMik50uvdjJVd262jaSBwiZ9cMoYW09gJZDNOxwwm6fstuOUv8r8GalOccnSxH9lnburB2fdaKeMlV4k1RQZgWrkSNpbDLln6o9vLuu2xWbOK2C+9Z5FHsGcQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730818541; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=AA+yf6mA3UaqtqgegBX9AbB2F7eAE7dWMPKa4nk3rUI=; b=emmMbyEN4TlOMxQgLHbA+SgsZ4D53HamFJPQN//5aU/d5BHV0fc8OIF0nd9fgSF0a5xwyWgrUnlasx3T5RZnY1arHMkjT2Cp08ysjMSS5wBCtj0lz4M7W6U8xEKc+46hQhT/Hfiq1bzPfpPxJBWcTFmE2f35CXw6BUrv+V8YI+E= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730818541122803.2035854441096; Tue, 5 Nov 2024 06:55:41 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.830380.1245365 (Exim 4.92) (envelope-from ) id 1t8Kxn-0007RS-A8; Tue, 05 Nov 2024 14:55:23 +0000 Received: by outflank-mailman (output) from mailman id 830380.1245365; Tue, 05 Nov 2024 14:55:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8Kxn-0007RL-6f; Tue, 05 Nov 2024 14:55:23 +0000 Received: by outflank-mailman (input) for mailman id 830380; Tue, 05 Nov 2024 14:55:22 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t8Kxl-0007K3-VY for xen-devel@lists.xenproject.org; Tue, 05 Nov 2024 14:55:22 +0000 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [2a00:1450:4864:20::329]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f935b9f3-9b85-11ef-99a3-01e77a169b0f; Tue, 05 Nov 2024 15:55:18 +0100 (CET) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4315eeb2601so65741235e9.2 for ; Tue, 05 Nov 2024 06:55:18 -0800 (PST) Received: from fziglio-desktop.lan (99.149.115.87.dyn.plus.net. [87.115.149.99]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431bd917fefsm217655855e9.16.2024.11.05.06.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Nov 2024 06:55:17 -0800 (PST) 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: f935b9f3-9b85-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjozMjkiLCJoZWxvIjoibWFpbC13bTEteDMyOS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImY5MzViOWYzLTliODUtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwODE4NTE4Ljc3NDMwNCwic2VuZGVyIjoiZnJlZGlhbm8uemlnbGlvQGNsb3VkLmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.com; s=cloud; t=1730818518; x=1731423318; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=AA+yf6mA3UaqtqgegBX9AbB2F7eAE7dWMPKa4nk3rUI=; b=gBoXWZON9nUTgSgQ9bGzHDehVZygPzDPkyg24bpnJpGrnmSFpPaPa46y6662OYgftL IVi5cTYGzD+6Ce/RoQFPGce/804Mxj8ySM6+RKnj44B0NpSJM4G7LD6L2issNueukj0I gkIRPy4Xy1lHdj1CNDETiwnP76CmUV2ZeODtk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730818518; x=1731423318; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AA+yf6mA3UaqtqgegBX9AbB2F7eAE7dWMPKa4nk3rUI=; b=O2/sc707QCehZPggPz3T4BgM9g1nomqB6VZrULQpnLcEwH9ttHHO/hsZAs2+/juSlq gukAU3BDoT8sZRepP9Fiq/BgM0wUPQvhVpM+5R4ZQITHC4caAP11vSy2oc0jk7C14+zp l/gC7P2GHfUYzhE9bAGoYJe2B6MFyrW5KOcm+B+ZYBsNHSSvHY+j9jDPIOZ/YF7Ev3GR Mp4NqidatJyQn1ZZalOjubb0Ae3eK0RIjQ8V9ZVE/wYNePWUU/FKqrhHftlYvBYnvFpT RXM5fF+2SB/Seo8xdSVKDweW9CIpwaX1pzUjw499oyxJDi4GxISCBvIrNfgwLPs4RM1g D/Wg== X-Gm-Message-State: AOJu0YztrzXLRFTF+JuWz+bfE1GfdEUsgAVPWysLZwwhtORhBQSTaDXO oYzk+I7X3eNK5FuWsl9JBr4+akjrOnE3Hxl8G9nLTTDq6lvPj24CzKkOW5az3O7P0Bes7yfpClu 6sxk= X-Google-Smtp-Source: AGHT+IFvz2u+n9ZttcoxNUWJKA4cbObvSacG2uE5RJGfK/Wa8/ORoBU2jXSg2Sxt9Sl6m7P+yg+aGA== X-Received: by 2002:a05:600c:3b04:b0:431:6083:cd30 with SMTP id 5b1f17b1804b1-43283242a2bmr164724875e9.6.1730818517876; Tue, 05 Nov 2024 06:55:17 -0800 (PST) From: Frediano Ziglio To: xen-devel@lists.xenproject.org Cc: Frediano Ziglio , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Julien Grall , Stefano Stabellini Subject: [PATCH] x86/boot: Fix build with LLVM toolchain Date: Tue, 5 Nov 2024 14:55:07 +0000 Message-Id: <20241105145507.613981-1-frediano.ziglio@cloud.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @cloud.com) X-ZM-MESSAGEID: 1730818542461116600 Content-Type: text/plain; charset="utf-8" This toolchain generates different object and map files. Account for these changes. Added sections need to have special type so we put them in separate sections as linker will copy type from input sections. Signed-off-by: Frediano Ziglio --- xen/arch/x86/boot/build32.lds.S | 9 +++++++++ xen/tools/combine_two_binaries.py | 17 +++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/boot/build32.lds.S b/xen/arch/x86/boot/build32.ld= s.S index f20fc18977..2e565180d5 100644 --- a/xen/arch/x86/boot/build32.lds.S +++ b/xen/arch/x86/boot/build32.lds.S @@ -66,6 +66,15 @@ SECTIONS *(.comment.*) *(.note.*) } + .shstrtab : { + *(.shstrtab) + } + .strtab : { + *(.strtab) + } + .symtab : { + *(.symtab) + } /* Dynamic linkage sections. Collected simply so we can check they're e= mpty. */ .got : { *(.got) diff --git a/xen/tools/combine_two_binaries.py b/xen/tools/combine_two_bina= ries.py index 447c0d3bdb..79ae8900b1 100755 --- a/xen/tools/combine_two_binaries.py +++ b/xen/tools/combine_two_binaries.py @@ -67,13 +67,22 @@ if args.exports is not None: =20 # Parse mapfile, look for ther symbols we want to export. if args.mapfile is not None: - symbol_re =3D re.compile(r'\s{15,}0x([0-9a-f]+)\s+(\S+)\n') + symbol_re_clang =3D \ + re.compile(r'\s+([0-9a-f]+)\s+([0-9a-f]+)\s+([0-9a-f]+)\s+([0-9a-f= ]+)\s{15,}(\S+)\n') + symbol_re_gnu =3D re.compile(r'\s{15,}0x([0-9a-f]+)\s+(\S+)\n') for line in open(args.mapfile): - m =3D symbol_re.match(line) - if not m or m.group(2) not in exports: + name =3D None + m =3D symbol_re_clang.match(line) + if m: + name =3D m.group(5) + else: + m =3D symbol_re_gnu.match(line) + if m: + name =3D m.group(2) + if name is None or name not in exports: continue addr =3D int(m.group(1), 16) - exports[m.group(2)] =3D addr + exports[name] =3D addr for (name, addr) in exports.items(): if addr is None: raise Exception("Required export symbols %s not found" % name) --=20 2.34.1