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

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