From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19EzLt-0000pS-00 for qemu-devel@nongnu.org; Sun, 11 May 2003 18:31:29 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19EzLO-00085c-00 for qemu-devel@nongnu.org; Sun, 11 May 2003 18:30:59 -0400 Received: from smtp5.wanadoo.fr ([193.252.22.27] helo=mwinf0403.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19EzKx-0007VB-00 for qemu-devel@nongnu.org; Sun, 11 May 2003 18:30:32 -0400 Received: from free.fr (unknown [81.53.133.62]) by mwinf0403.wanadoo.fr (SMTP Server) with ESMTP id 309EE50002F9 for ; Mon, 12 May 2003 00:30:31 +0200 (CEST) Message-ID: <3EBECE4E.10501@free.fr> Date: Mon, 12 May 2003 00:27:26 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] Alpha update References: <87ptmqjm3q.fsf@student.uni-tuebingen.de> <3EBE4BBF.1020403@free.fr> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , To: qemu-devel@nongnu.org Fabrice Bellard wrote: > > However, there are still problems with the ELF loader. It seems like > > some binaries want a mmaping at an offset that is not divisible by the > > page size: > > > > ./qemu -d /usr/local/qemu-i386/bin/ls-i386 > > [...] > > mmap4k(start = 0x8052000, length = 592, prot = 0x3 (rw), > > flags = 0x2102 (MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE), > > fd = 4, offset = 39040) > > > > 39040 % 4096 == 2176 > > > > Alpha Linux 2.5.69 doesn't seem to handle unaligned offsets. Do other > > architecures? Or earlier versions? The em86 code doesn't seem to care > > about this at all. The only thing to handle this I can think of is to > > mmap anonymously and use read() to fill in the data... or am I missing > > something? I don't see how it is possible in this particular case: the ELF file is built to be mapped directly in memory so it is a bug in the ELF loader logic. Note: The 2.4.x kernel also refuses unaligned offsets on i386. Fabrice.