libcareplus/gensrc-skip-vector-instruction-in-str_do_gotpcrel.patch
yezengruan 5138d02845 update spec with openeuler !31 !4
libcare-dump: change the return value
gensrc: skip vector instruction in str_do_gotpcrel

Signed-off-by: yezengruan <yezengruan@huawei.com>
(cherry picked from commit c1712c9eb7c34f10f44dd0e1688acc713cbb98b6)
2022-05-11 17:00:11 +08:00

32 lines
1022 B
Diff

From ca5e000a30eae58e84c98fef9c511ef61ec00fbe Mon Sep 17 00:00:00 2001
From: Chuan Zheng <zhengchuan@huawei.com>
Date: Mon, 26 Apr 2021 14:48:34 +0800
Subject: [PATCH] gensrc: skip vector instruction in str_do_gotpcrel
We might have "move (%rip) %0xmm0" in qemu hotpatch, which causes
gensrc failure in str_do_gotpcrel.
Fix it by skipping it because we do not need anything for vector command.
---
src/kpatch_gensrc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/kpatch_gensrc.c b/src/kpatch_gensrc.c
index a16b652..4f978f8 100644
--- a/src/kpatch_gensrc.c
+++ b/src/kpatch_gensrc.c
@@ -291,6 +291,11 @@ void str_do_gotpcrel(struct kp_file *f, char *dst, char *src)
goto out;
}
+ if (strstr(movdst.s, "%xmm") != NULL) {
+ /* Is SSE (%xmm0, etc), bail out */
+ goto out;
+ }
+
/* Use full 64-bit counterpart of the destination register
* as the auxiliary register */
get_full_reg(&movdst, auxreg);
--
2.27.0