Blame SOURCES/v0.9.2-backport-MR-1281-create-diff-object-add-suppo.patch

cbf2d8
From d98f100dc979f87296ec88b63a0d506aaf4cd2bd Mon Sep 17 00:00:00 2001
cbf2d8
From: Joe Lawrence <joe.lawrence@redhat.com>
cbf2d8
Date: Thu, 8 Dec 2022 12:31:17 -0500
cbf2d8
Subject: [PATCH] v0.9.2 backport: MR!1281 ("create-diff-object: add support
cbf2d8
 for .return_sites section (x86)")
cbf2d8
Content-type: text/plain
cbf2d8
cbf2d8
commit 33368a88cdf875b0edd02b0dfd3356a7e93b24db
cbf2d8
Author: Jonathan Dobson <jdobson@redhat.com>
cbf2d8
Date:   Sat Jul 16 15:46:54 2022 -0600
cbf2d8
cbf2d8
    create-diff-object: add support for .return_sites section (x86)
cbf2d8
cbf2d8
    Conflicts:
cbf2d8
    	kpatch-build/create-diff-object.c
cbf2d8
	- Manually apply patch to avoid diff context, v0.9.2 structure
cbf2d8
	  special_section structure doesn't have .arch
cbf2d8
cbf2d8
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
cbf2d8
---
cbf2d8
 kpatch-build/create-diff-object.c | 10 ++++++++++
cbf2d8
 1 file changed, 10 insertions(+)
cbf2d8
cbf2d8
diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c
cbf2d8
index cee8adf333dc..c9afe33bbdae 100644
cbf2d8
--- a/kpatch-build/create-diff-object.c
cbf2d8
+++ b/kpatch-build/create-diff-object.c
cbf2d8
@@ -1991,6 +1991,11 @@ static int altinstructions_group_size(struct kpatch_elf *kelf, int offset)
cbf2d8
 	return size;
cbf2d8
 }
cbf2d8
 
cbf2d8
+static int return_sites_group_size(struct kpatch_elf *kelf, int offset)
cbf2d8
+{
cbf2d8
+	return 4;
cbf2d8
+}
cbf2d8
+
cbf2d8
 static int smp_locks_group_size(struct kpatch_elf *kelf, int offset)
cbf2d8
 {
cbf2d8
 	return 4;
cbf2d8
@@ -2103,6 +2108,11 @@ static struct special_section special_sections[] = {
cbf2d8
 		.name		= ".altinstructions",
cbf2d8
 		.group_size	= altinstructions_group_size,
cbf2d8
 	},
cbf2d8
+	{
cbf2d8
+		.name		= ".return_sites",
cbf2d8
+		.group_size	= return_sites_group_size,
cbf2d8
+	},
cbf2d8
+
cbf2d8
 #endif
cbf2d8
 #ifdef __powerpc64__
cbf2d8
 	{
cbf2d8
-- 
cbf2d8
2.38.1
cbf2d8