This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Finding the start and end of memory areas


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]