Skip to contentSkip to conversation

[5037] Kludge to support linux-user on a PPC64

Qemu-devel malc 1 participant 1 message Aug 20, 2008

lore
Share & tools
lore

malc

author
#0 lore raw

Revision: 5037

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5037
Author:   malc
Date:     2008-08-20 22:39:28 +0000 (Wed, 20 Aug 2008)

Log Message:
-----------
Kludge to support linux-user on a PPC64

Some headers (e.g. signal.h) include asm/elf.h and the chaos of macro redefinitions ensues, this kludge avoids it.

Alternative way to fight that would be to change all ELF_XXX and some other definitions to QEMU_ELF_XXX or something to that effect.

This patch concludes the quest for enabling linux-user on PPC64, however, since qemu_mallocz uses mmap and, at least on this system, mmap tends to return values that do not fit into 32bit, emulation for 32bit targets does not work without some hacks wich are to disgusting to commit (and as `man mmap' tells us MAP_32BIT is only implemented on X86_64)

Modified Paths:
--------------
trunk/linux-user/elfload.c

Modified: trunk/linux-user/elfload.c
===================================================================

linux-user/elfload.c +9 -0
@@ -12,6 +12,15 @@
 #include "qemu.h"
 #include "disas.h"
 
+#ifdef __powerpc64__
+#undef ARCH_DLINFO
+#undef ELF_PLATFORM
+#undef ELF_HWCAP
+#undef ELF_CLASS
+#undef ELF_DATA
+#undef ELF_ARCH
+#endif
+
 /* from personality.h */
 
 /*