mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
The calling convention used by the FreeBSD ELF OSABI is exactly the same as the the one defined by System V, so payloads with a FreeBSD OSABI should be accepted by the xsplice machinery. Specifically "the FreeBSD ELF OSABI only has a meaning for userspace applications, it's used by FreeBSD in order to detect if an application is native or if it needs to be run in the linuxator (the Linux emulator, or any other emulator that is available and matches the ELF OSABI specified in the binary FWIW). The only difference from SYSV to FreeBSD OSABI is the sysentvec that's selected inside of the FreeBSD kernel (the ABI between the kernel and the user-space application), but of course this doesn't apply to kernel code, which is what Xen and the xsplice payloads are. Sadly this is not written anywhere. " And since the ELF tools on FreeBSD by default build with this - they would stick this OSABI entry. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ross Lagerwall <ross.lagerwall@citrix.com>
This commit is contained in:
1 parent
75529048f4
commit
f8c66c2ad2
1 file changed
+2
-1
@@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf)
|
||||
if ( hdr->e_version != EV_CURRENT ||
|
||||
hdr->e_ident[EI_VERSION] != EV_CURRENT ||
|
||||
hdr->e_ident[EI_ABIVERSION] != 0 ||
|
||||
hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
|
||||
(hdr->e_ident[EI_OSABI] != ELFOSABI_NONE &&
|
||||
hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ||
|
||||
hdr->e_type != ET_REL ||
|
||||
hdr->e_phnum != 0 )
|
||||
{
|
||||
|
||||