[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/5] xen/x86: always consider '/' as a division in assembly
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Thu, 12 Feb 2026 15:46:14 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=wh320IbJQxO6ze/dPB0WWfdclKSpmzsopc5TM88YTsA=; b=Aq1ujrfnF7KWsZdCI+HeIHMfnfjc+TcAuNo65xbpf1+9nZ/CZDsOuHt/62S73rvijItD8r4/W/J3DEan8uiXskkhmlqVGu3kfVhyn2nYBRo70glpJHU4RP7sqbrbRsYDnglXie4PjMh2xnjy4u15p/VwTyvX2cUQv+CVjKaRD6vOV0uTqc6Gn7m2RSpKtp2E374laireH6/BXF2qvn+Fkl3kWS6ctQvJJ0jdp3+3FBfMXRayHQYy909j+kGXdngKKMtFi4iLe+xILgY2iOj12sypKDszD3n9KOhdLfWKSML2p3LxkR/7Ij79XBBBK1ADPYpRvqXGUXzUMmN6UwIH2Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GISd4GFEL8vXLf5v/9lSvKn2tmQMUWogRTAISxdIdyC/zZWa/f0gVWMsCl4zRv+7BHC+h8OQhDIvdRpDYjEM2yNDRnB4Zey+QKc7xV/HRqIbdPddSA2EdN2vZioMCH9Ji8jAKWGbwD9DZBwmtJ1smGcfmv2AP1lKLMKjB0zYmKhhUUTX5dtOW9LBBYMswU62Xj/GYdU6+zejy2r79GPAFdbQGOnCJ8VM71YHhTFO0Dddjni9Pr4qhr4cPxmdkRk7rCePw7RZD7FHauabbDoCpED4S37WXCypZE7pUFzHQW6PeEZs4plzWGk8iMfizWVk100VEtO+J6q4nbgDh1fxOw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Delivery-date: Thu, 12 Feb 2026 14:46:31 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On x86 GNU assembler will consider '/' as the start of comment marker for
some ELF targets. This is incorrect with Xen's usage, which does use '/'
in assembly files as a mathematical operator.
The behavior of the assembler can be altered by passing the --divide
option; unconditionally pass this option when available to force the
expected behavior.
Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v1:
- Move option add to x86 specific makefile.
---
xen/arch/x86/arch.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk
index 0203138a819a..2e06ae2582dc 100644
--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -123,3 +123,8 @@ endif
# Set up the assembler include path properly for older toolchains.
CFLAGS += -Wa,-I$(objtree)/include -Wa,-I$(srctree)/include
+
+# The GNU assembler will interpret '/' as a comment start marker instead of a
+# divide for some ELF targets. Pass --divide when when available to signal '/'
+# is always used as an operator in assembly.
+$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)--divide)
--
2.51.0
|