|
From: Nicholas N. <nj...@ca...> - 2004-08-05 12:56:24
|
On Thu, 5 Aug 2004, Oswald Buddenhagen wrote:
> i did this a few days ago (with 0xa0000000) to accomodate the
> PAGE_OFFSET change i did to be able to use the whole 1 gig of ram
> without compiling linux for highmem. memcheck works like a charm.
I don't know what the PAGE_OFFSET change is (is it relevant to Valgrind?)
but thanks for the data point, it's useful to know of another possible
memory layout.
> i was pondering with the idea of submitting a configure patch, for
> either manually specifying the load address or auto-detecting it, but
> now that you plan to take care of this yourself ... ;)
Hmm, yes, I'm thinking about ways to improve this. I guess the ideal
thing is to auto-detect the highest addresses available, and put valgrind
there -- be it at:
0xb0000000--0xbfffffff on typical 3G/1G systems
0x70000000--0x7fffffff on 2G/2G systems
0xf0000000--0xffffffff on 4G systems
0xa0000000--0xafffffff for your PAGE_OFFSET thingy
or somewhere else.
I think this highest address can always be determined by looking at where
the stack is... so stage1 should find this place, and then load stage2 in
the found place (ignoring where the elf info says it should go), and tell
stage2 where it is loaded by via the auxv...
N
|