[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] arm: bugframe: emit msg offset only if msg is present
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Date: Fri, 29 Nov 2024 01:49:09 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=91rks3iGHddXWlb9TaITzGl1ioO2H4KAWWNhdEIdpuY=; b=MmJUWDB0b0zyl7Rh0NMO16MbMcx8H4b+Rmy5WY0U6Xm1oSyKeYDDjLdzfS8Fet2YgteWStg371b51ZvQvz8FPgCNcgWlhe/JNvgMEwt4avNagIYVyMYQwFTF4K6Q7R2j9XuqqeTGYbWCZo32fD/yRc2TXIM7IhMBwwKaWGlCUOldFeeHHllQyWq3PJb9hN276VGRE4XsZBvDK7kUjMWX0fplbp4VRC/4fLv3M+9er0pXneSotw0r7LAGbuMHUiT9RSriZ35bwAbq4ijwShPlOPt4jJFgcBK1dMq6Z/QM05xx1Ja9xPL+GS+8v8TnCtL6e0HAY26UgDEW6JOg+uqTiw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ElJ3vJBzxP8+LZqZTOlsmpAtXVWtyicatYOS/qL3rQD4vVjkztPTArMJA/C3n/tqkDATZ7UiGjHKg1Dic4cpV3O5DEdFo9D1kWQdKZq6VACWG4Z/jK6A9dEKIDXC+QZAadJUp6oetsgMsZAex98DJC/4zd0taQJna1xez5nWAX3DRukqSoLl25Yiuw2uM2Ut+jL4iSADsW50/aYcmSQpUVwwirL1T2HkVREROr4RT074lrAjtDkvsrrHEGHFAtOxMq+E1VmYRdrtHXSFO7k2rYMrfmuiD3iU87l4KMg1K7qO/pt83TF80IFZie89H29RINkm4I1+hAAcAJD4KcepWQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Fri, 29 Nov 2024 01:49:28 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbQgDhNP952szXN02UUErt4gl8yg==
- Thread-topic: [PATCH 1/5] arm: bugframe: emit msg offset only if msg is present
Before this change, compiler would generate symbol that points right
past .rodata.str section. While GNU ld handles this just fine, LLVM ld
will complain:
ld.lld: error: common/device-tree/device-tree.o:(.rodata.str): offset is
outside the section
Fix this issue by providing literal zero instead of calculated zero if
there is no error message in a bugframe.
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
---
xen/arch/arm/include/asm/bug.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/arch/arm/include/asm/bug.h b/xen/arch/arm/include/asm/bug.h
index cacaf014ab..9339e3bbf6 100644
--- a/xen/arch/arm/include/asm/bug.h
+++ b/xen/arch/arm/include/asm/bug.h
@@ -47,7 +47,11 @@ struct bug_frame {
".p2align 2\n" \
".long (1b - 4b)\n" \
".long (2b - 4b)\n" \
+ ".if " #has_msg "\n" \
".long (3b - 4b)\n" \
+ ".else\n" \
+ ".long 0\n" \
+ ".endif\n" \
".hword " __stringify(line) ", 0\n" \
".popsection"); \
} while (0)
--
2.47.0
|