]> git.ipfire.org Git - thirdparty/grub.git/commit
xen: Look for Xen notes in section headers too
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Thu, 14 Mar 2019 01:57:08 +0000 (02:57 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 19 Mar 2019 10:38:29 +0000 (11:38 +0100)
commit67580c0068b59d3049f8b7becd72b2bac5f988f5
tree113ceb9e53414f9463a812b9582f96f35d42e68b
parent5dfa0afa169f915471d4d55f519a6f3b830e37ae
xen: Look for Xen notes in section headers too

Mirror behaviour of ELF loader in libxc: first look for Xen notes in
PT_NOTE segment, then in SHT_NOTE section and only then fallback to
a section with __xen_guest name. This fixes loading PV kernels that
Xen note have outside of PT_NOTE. While this may be result of a buggy
linker script, loading such kernel directly works fine, so make it work
with GRUB too. Specifically, this applies to binaries built from Unikraft.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/i386/xen_fileXX.c