]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
tests: tcg: Fix PVH test with binutils 2.36+
authorCole Robinson <crobinso@redhat.com>
Fri, 8 Oct 2021 16:21:01 +0000 (12:21 -0400)
committerMichael Roth <michael.roth@amd.com>
Wed, 15 Dec 2021 13:13:37 +0000 (07:13 -0600)
binutils started adding a .note.gnu.property ELF section which
makes the PVH test fail:

  TEST    hello on x86_64
qemu-system-x86_64: Error loading uncompressed kernel without PVH ELF Note

Discard .note.gnu* while keeping the PVH .note bits intact.

This also strips the build-id note, so drop the related comment.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Message-Id: <5ab2a54c262c61f64c22dbb49ade3e2db8a740bb.1633708346.git.crobinso@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 8e751e9c38e324737fd3d3aa0562f886313bba3c)
Signed-off-by: Michael Roth <michael.roth@amd.com>
tests/tcg/x86_64/system/kernel.ld

index 49c12b04ae12124bcff489aecc826f062fdb7f35..ca5d6bd8509db6161e79314901f3014afb4c0a77 100644 (file)
@@ -16,7 +16,10 @@ SECTIONS {
                *(.rodata)
        } :text
 
-        /* Keep build ID and PVH notes in same section */
+        /DISCARD/ : {
+                *(.note.gnu*)
+        }
+
         .notes :  {
                *(.note.*)
         } :note