blob: 49d840f8c4860c27df78fac9dcb6cd3664683ff7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
From 1cbeb625a3551ad7e3184f9713875b584552df9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= <roger.pau@citrix.com>
Date: Tue, 12 Nov 2024 13:54:56 +0100
Subject: [PATCH 56/56] xen/x86: prevent addition of .note.gnu.property if
livepatch is enabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GNU assembly that supports such feature will unconditionally add a
.note.gnu.property section to object files. The content of that section can
change depending on the generated instructions. The current logic in
livepatch-build-tools doesn't know how to deal with such section changing
as a result of applying a patch and rebuilding.
Since .note.gnu.property is not consumed by the Xen build, suppress its
addition when livepatch support is enabled.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 718400a54dcfcc8a11958a6d953168f50944f002
master date: 2024-11-11 13:19:45 +0100
---
xen/arch/x86/arch.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk
index 751fd8d410..aa55f54f69 100644
--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -46,6 +46,12 @@ CFLAGS-$(CONFIG_CC_IS_GCC) += -fno-jump-tables
CFLAGS-$(CONFIG_CC_IS_CLANG) += -mretpoline-external-thunk
endif
+# Disable the addition of a .note.gnu.property section to object files when
+# livepatch support is enabled. The contents of that section can change
+# depending on the instructions used, and livepatch-build-tools doesn't know
+# how to deal with such changes.
+$(call cc-option-add,CFLAGS-$(CONFIG_LIVEPATCH),CC,-Wa$$(comma)-mx86-used-note=no)
+
ifdef CONFIG_XEN_IBT
# Force -fno-jump-tables to work around
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816
--
2.47.0
|