From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HdSmB-0000hc-OF for qemu-devel@nongnu.org; Mon, 16 Apr 2007 11:05:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HdSm8-0000hQ-ET for qemu-devel@nongnu.org; Mon, 16 Apr 2007 11:05:55 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdSm8-0000hN-Ak for qemu-devel@nongnu.org; Mon, 16 Apr 2007 11:05:52 -0400 Received: from ug-out-1314.google.com ([66.249.92.172]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HdShV-0005km-92 for qemu-devel@nongnu.org; Mon, 16 Apr 2007 11:01:05 -0400 Received: by ug-out-1314.google.com with SMTP id j40so941601ugd for ; Mon, 16 Apr 2007 08:01:04 -0700 (PDT) Message-ID: Date: Mon, 16 Apr 2007 18:01:04 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] qemu/pc-bios README openbios-sparc32 openbios-s... In-Reply-To: <20070415220846.GA15315@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200704152001.35967.paul@codesourcery.com> <200704152020.17217.paul@codesourcery.com> <20070415220846.GA15315@caradoc.them.org> 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 On 4/16/07, Daniel Jacobowitz wrote: > On Sun, Apr 15, 2007 at 10:37:08PM +0300, Blue Swirl wrote: > > On 4/15/07, Paul Brook wrote: > > > On Sunday 15 April 2007 20:11, Blue Swirl wrote: > > > > > Probably the linker is making sure the file offset and VMA are the same > > > > > modulo the page size. > > > > > > > > But that would be one huge file, as the VMA is near 2TB: > > > > > > I said *modulo the pace size* :-) > > > Lets say ld thinks the page size for your system is 1Mb (nor an unreasonable > > > assumption). The vma of .text is aligned on a 1Mb boundary. In order to > > > allow loading via mmap, the location of .text within the file must also be > > > aligned on a 1Mb boundary. It can't put it at address zero because the ELF > > > headers get in the way, so the first viable location is 1Mb into the file. > > > > Nice theory (and I missed the modulo arithmetic, sorry), but on > > Ultrasparc the page sizes available are 8k, 64k, 4M and 256M. > > #define ELF_MAXPAGESIZE 0x100000 > > BFD and GNU ld think it's 1MB. I stand corrected. Is there anything that can be done to reduce this waste?