util/getauxval: Porting to FreeBSD getauxval feature
From d7f9d40777d1ed7c9450b0be4f957da2993dfc72 Mon Sep 17 00:00:00 2001 From: David Carlier <devnexen@gmail.com> Date: Fri, 12 Jun 2020 09:39:17 +0100 Subject: [PATCH] util/getauxval: Porting to FreeBSD getauxval feature FreeBSD has a similar API for auxiliary vector. Signed-off-by: David Carlier <devnexen@gmail.com> Message-Id: <CA+XhMqxTU6PUSQBpbA9VrS1QZfqgrCAKUCtUF-x2aF=fCMTDOw@mail.gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
494cd11d76
commit
ae2b72072b
@ -98,6 +98,16 @@ unsigned long qemu_getauxval(unsigned long type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/auxv.h>
|
||||
|
||||
unsigned long qemu_getauxval(unsigned long type)
|
||||
{
|
||||
unsigned long aux = 0;
|
||||
elf_aux_info(type, &aux, sizeof(aux));
|
||||
return aux;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
unsigned long qemu_getauxval(unsigned long type)
|
||||
|
Loading…
Reference in New Issue
Block a user