linux-user: Move ppc uabi/asm/elf.h workaround to osdep.h
Move the workaround out of linux-user/elfload.c, so that we don't have to replicate it in many places. Place it immediately after the include of <signal.h>, which draws in the relevant symbols. Note that ARCH_DLINFO is not defined by the kernel header, and so there's no need to undef it either. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
58afe4cfe9
commit
a859022cea
3 changed files with 8 additions and 14 deletions
|
|
@ -295,10 +295,6 @@ static void *load_at(int fd, off_t offset, size_t size)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
#ifdef ELF_CLASS
|
||||
#undef ELF_CLASS
|
||||
#endif
|
||||
|
||||
#define ELF_CLASS ELFCLASS32
|
||||
#include "elf.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,14 @@ QEMU_EXTERN_C int daemon(int, int);
|
|||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
|
||||
/*
|
||||
* Avoid conflict with linux/arch/powerpc/include/uapi/asm/elf.h, included
|
||||
* from <asm/sigcontext.h>, but we might as well do this unconditionally.
|
||||
*/
|
||||
#undef ELF_CLASS
|
||||
#undef ELF_DATA
|
||||
#undef ELF_ARCH
|
||||
|
||||
#ifdef CONFIG_IOVEC
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,16 +35,6 @@
|
|||
#include "target/arm/cpu-features.h"
|
||||
#endif
|
||||
|
||||
#ifdef _ARCH_PPC64
|
||||
#undef ARCH_DLINFO
|
||||
#undef ELF_PLATFORM
|
||||
#undef ELF_HWCAP
|
||||
#undef ELF_HWCAP2
|
||||
#undef ELF_CLASS
|
||||
#undef ELF_DATA
|
||||
#undef ELF_ARCH
|
||||
#endif
|
||||
|
||||
#ifndef TARGET_ARCH_HAS_SIGTRAMP_PAGE
|
||||
#define TARGET_ARCH_HAS_SIGTRAMP_PAGE 0
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue