Cole Robinson fddd169de5 tests: tcg: Fix PVH test with binutils 2.36+
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>
2021-12-15 07:13:37 -06:00

37 lines
443 B
Plaintext

PHDRS {
text PT_LOAD FLAGS(5); /* R_E */
note PT_NOTE FLAGS(0); /* ___ */
}
SECTIONS {
. = 0x100000;
.text : {
__load_st = .;
*(.head)
*(.text)
} :text
.rodata : {
*(.rodata)
} :text
/DISCARD/ : {
*(.note.gnu*)
}
.notes : {
*(.note.*)
} :note
.data : {
*(.data)
__load_en = .;
} :text
.bss : {
*(.bss)
__bss_en = .;
}
}