peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0001-tests-tcg-Fix-PVH-test-with-binutils-2.36.patch

7be05b
From 5ab2a54c262c61f64c22dbb49ade3e2db8a740bb Mon Sep 17 00:00:00 2001
7be05b
Message-Id: <5ab2a54c262c61f64c22dbb49ade3e2db8a740bb.1633708346.git.crobinso@redhat.com>
7be05b
From: Cole Robinson <crobinso@redhat.com>
7be05b
Date: Fri, 8 Oct 2021 11:47:45 -0400
7be05b
Subject: [PATCH] tests: tcg: Fix PVH test with binutils 2.36+
7be05b
7be05b
binutils started adding a .note.gnu.property ELF section which
7be05b
makes the PVH test fail:
7be05b
7be05b
  TEST    hello on x86_64
7be05b
qemu-system-x86_64: Error loading uncompressed kernel without PVH ELF Note
7be05b
7be05b
Discard .note.gnu* while keeping the PVH .note bits intact.
7be05b
7be05b
This also strips the build-id note, so drop the related comment.
7be05b
7be05b
Signed-off-by: Cole Robinson <crobinso@redhat.com>
7be05b
---
7be05b
 tests/tcg/x86_64/system/kernel.ld | 5 ++++-
7be05b
 1 file changed, 4 insertions(+), 1 deletion(-)
7be05b
7be05b
diff --git a/tests/tcg/x86_64/system/kernel.ld b/tests/tcg/x86_64/system/kernel.ld
7be05b
index 49c12b04ae..ca5d6bd850 100644
7be05b
--- a/tests/tcg/x86_64/system/kernel.ld
7be05b
+++ b/tests/tcg/x86_64/system/kernel.ld
7be05b
@@ -16,7 +16,10 @@ SECTIONS {
7be05b
 		*(.rodata)
7be05b
 	} :text
7be05b
 
7be05b
-        /* Keep build ID and PVH notes in same section */
7be05b
+        /DISCARD/ : {
7be05b
+                *(.note.gnu*)
7be05b
+        }
7be05b
+
7be05b
         .notes :  {
7be05b
                *(.note.*)
7be05b
         } :note
7be05b
-- 
7be05b
2.32.0
7be05b