LAKITU: grub: rebase .interp changes

BUG=b/257271340
TEST=presubmit
RELEASE_NOTE=None

Change-Id: Ib8dcc1a2d97b8201bd0b39c344f36243ba42013f
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/chromiumos-overlay/+/41080
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Oleksandr Tymoshenko <ovt@google.com>
diff --git a/sys-boot/grub/files/0005-strip-interp-from-diskboot.patch b/sys-boot/grub/files/0005-strip-interp-from-diskboot.patch
deleted file mode 100644
index 492f468..0000000
--- a/sys-boot/grub/files/0005-strip-interp-from-diskboot.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- grub-core/Makefile.core.def	2021-07-06 23:58:33.094383161 -0700
-+++ grub-core/Makefile.core.def	2021-07-06 23:59:01.142164648 -0700
-@@ -372,7 +372,7 @@
-   sparc64_ieee1275_objcopyflags = '-O a.out-sunos-big';
-   sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x4000';
- 
--  objcopyflags = '-O binary';
-+  objcopyflags = '-R .interp -O binary';
-   enable = i386_pc;
-   enable = i386_qemu;
-   enable = sparc64_ieee1275;
-@@ -430,7 +430,7 @@
-   sparc64_ieee1275 = boot/sparc64/ieee1275/diskboot.S;
-   sparc64_ieee1275_ldflags = '-Wl,-Ttext=0x4200';
- 
--  objcopyflags = '-O binary';
-+  objcopyflags = '-R .interp -O binary';
- 
-   enable = i386_pc;
-   enable = sparc64_ieee1275;
diff --git a/sys-boot/grub/files/0039-strip-interp-from-diskboot.patch b/sys-boot/grub/files/0039-strip-interp-from-diskboot.patch
new file mode 100644
index 0000000..6948404
--- /dev/null
+++ b/sys-boot/grub/files/0039-strip-interp-from-diskboot.patch
@@ -0,0 +1,20 @@
+--- a/grub-core/Makefile.core.def.orig    2022-12-21 16:42:33.000000000 -0800
++++ b/grub-core/Makefile.core.def 2022-12-21 16:45:03.269958370 -0800
+@@ -438,7 +438,7 @@
+   sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x3fe0';
+   sparc64_ieee1275_objcopyflags = '-O binary';
+
+-  objcopyflags = '-O binary';
++  objcopyflags = '-R .interp -O binary';
+   enable = i386_pc;
+   enable = i386_qemu;
+   enable = sparc64_ieee1275;
+@@ -498,7 +498,7 @@
+   sparc64_ieee1275 = boot/sparc64/ieee1275/diskboot.S;
+   sparc64_ieee1275_ldflags = '-Wl,-Ttext=0x4200';
+
+-  objcopyflags = '-O binary';
++  objcopyflags = '-R .interp -O binary';
+
+   enable = i386_pc;
+   enable = sparc64_ieee1275;
diff --git a/sys-boot/grub/grub-2.06.ebuild b/sys-boot/grub/grub-2.06.ebuild
index 4bdfd4f..9f1cd9a 100644
--- a/sys-boot/grub/grub-2.06.ebuild
+++ b/sys-boot/grub/grub-2.06.ebuild
@@ -69,6 +69,8 @@
 	"${FILESDIR}/0036-fs-btrfs-Fix-several-fuzz-issues-with-invalid-dir-it.patch"
 	"${FILESDIR}/0037-fs-btrfs-Fix-more-ASAN-and-SEGV-issues-found-with-fu.patch"
 	"${FILESDIR}/0038-fs-btrfs-Fix-more-fuzz-issues-related-to-chunks.patch"
+
+	"${FILESDIR}/0039-strip-interp-from-diskboot.patch"
 )
 
 src_prepare() {