From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36490 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Phots-0005iE-TX for qemu-devel@nongnu.org; Tue, 25 Jan 2011 14:50:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Photr-0005In-PT for qemu-devel@nongnu.org; Tue, 25 Jan 2011 14:50:00 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:45128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Photr-0005If-LF for qemu-devel@nongnu.org; Tue, 25 Jan 2011 14:49:59 -0500 Received: by wyg36 with SMTP id 36so163801wyg.4 for ; Tue, 25 Jan 2011 11:49:58 -0800 (PST) Message-ID: <4D3F2961.5020702@gmail.com> Date: Tue, 25 Jan 2011 20:49:53 +0100 From: Stefano Bonifazi MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu-user: relocating target code weakness References: <4D3D63B3.1030402@gmail.com> <4D3DD713.10405@twiddle.net> <4D3DF2A9.3080609@gmail.com> <4D3E292E.9090001@twiddle.net> <4D3E8E22.7070208@gmail.com> <4D3EAEA9.5050302@gmail.com> <4D3EF9BD.4010208@twiddle.net> In-Reply-To: <4D3EF9BD.4010208@twiddle.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: QEMU Developers , Mike Frysinger On 01/25/2011 05:26 PM, Richard Henderson wrote: > On 01/25/2011 03:06 AM, Stefano Bonifazi wrote: >>> start_brk 0x00000000 >>> end_code 0x400102e0 >>> start_code 0x40000000 >>> start_data 0x4001024c >>> end_data 0x400102e0 >>> start_stack 0x40811438 >>> brk 0x400102e4 >>> entry 0x40828c24 >> that is start_brk is 0 >> As far as I understood brk is the .bss section, that is unitialized data area, am I right? > Not quite. It's normally the beginning of the heap, after the bss section. > > That said, it looks like start_brk is a dead variable. It's written only by the > FLAT loader, and nothing at all reads it, except for this debugging dump. > > The "real" value is the "brk" variable, which is indeed set to a plausible looking value. > > > r~ Thank you!! I really missed that.. I've always wondered where the heap was! So brk and start_brk are the same .. the latter just being used previously and now forgotten there? Is there a heap end address? Is it possible to set it someway? It would be really very helpful for me!! Thank you again! Best regards! Stefano B.