From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11595 invoked by alias); 23 Dec 2004 00:22:00 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 11461 invoked from network); 23 Dec 2004 00:21:46 -0000 Received: from unknown (HELO mproxy.gmail.com) (216.239.56.247) by sourceware.org with SMTP; 23 Dec 2004 00:21:46 -0000 Received: by mproxy.gmail.com with SMTP id w41so109389cwb for ; Wed, 22 Dec 2004 16:21:45 -0800 (PST) Received: by 10.11.94.36 with SMTP id r36mr302625cwb; Wed, 22 Dec 2004 16:21:45 -0800 (PST) Received: by 10.11.99.52 with HTTP; Wed, 22 Dec 2004 16:21:45 -0800 (PST) Message-ID: <7f45d93904122216217855ef5f@mail.gmail.com> Date: Thu, 23 Dec 2004 00:22:00 -0000 From: Shaun Jackman Reply-To: Shaun Jackman To: binutils@sources.redhat.com Subject: Finding the start and end of memory areas Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00286.txt.bz2 First off, this posting is somewhat off-topic. My apologies in advance. If anyone knows of a better forum for this topic, I'd appreciate being pointed in the right direction. Now, on to my question... I'd like to find the start and end of the following memory areas during run-time... text data bss - &__bss_start to &__bss_end heap - &__bss_end to sbrk(0) (gap) stack - stack pointer to ? Presumably, they appear in that order in memory, so then end of one should be the start of the next. Note that I'm doing this at run-time by the program itself (introspection, as it were) and not with tools like readelf and objdump. I've filled in the few values I know. If you can provide any others I'd appreciate it. If it affects the results, the target architectures are i686-pc-linux-gnu and arm-elf. Many thanks! Shaun