Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KVwKy-000275-CK for qemu-devel@nongnu.org; Wed, 20 Aug 2008 18:39:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KVwKw-00025M-6Q for qemu-devel@nongnu.org; Wed, 20 Aug 2008 18:39:30 -0400 Received: from [199.232.76.173] (port=57183 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KVwKw-00025E-1D for qemu-devel@nongnu.org; Wed, 20 Aug 2008 18:39:30 -0400 Received: from savannah.gnu.org ([199.232.41.3]:40541 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KVwKv-0004me-Mg for qemu-devel@nongnu.org; Wed, 20 Aug 2008 18:39:29 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KVwKv-0006T1-6I for qemu-devel@nongnu.org; Wed, 20 Aug 2008 22:39:29 +0000 Received: from malc by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KVwKv-0006Sx-1t for qemu-devel@nongnu.org; Wed, 20 Aug 2008 22:39:29 +0000 MIME-Version: 1.0 Errors-To: malc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: malc Message-Id: Date: Wed, 20 Aug 2008 22:39:29 +0000 Subject: [Qemu-devel] [5037] Kludge to support linux-user on a PPC64 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 =================================================================== --- trunk/linux-user/elfload.c 2008-08-20 22:39:26 UTC (rev 5036) +++ trunk/linux-user/elfload.c 2008-08-20 22:39:28 UTC (rev 5037) @@ -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 */ /*