|
From: Tom H. <to...@co...> - 2005-06-22 13:16:20
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
>> The main advantage of PIE is that it gives us more space for the
>> client on systems where the kernel gives us more of the address space
>> to play with. On ppc32 systems, in many configurations we only get
>> 2GB address space, but on some machines we get 3GB, and on a ppc64
>> machine we get a full 4GB of address space for 32-bit processes. If
>> we have a fixed base for stage2 we have to pick 0x70000000 and thus
>> waste 2GB of address space on a ppc64 machine (such as my G5).
>
> Just checking my understanding is correct: the fact that a fixed base
> of (say) 0x70000000 for stage2 causes a wastage of address space is
> a consequence only of the current address-space-layout scheme V uses,
> correct? So if I just compile some program with and without PIE
> and run it natively, the amount of address space available to it
> is unaffected by the PIEness, correct?
Absolutely. The reason for the address space wastage is simply that
valgrind currently limits the client to using space below it's own
load address.
> Motivation for these questions is that there's been for a while a
> plan to rewrite the address space manage (m_aspacemgr) to be more
> flexible in layout. I want to be sure that if that happens, it will
> render moot the issue of limited address space when PIE is not used.
Exactly - if the address space is broken up into chunks and parcelled
out to valgrind and client as required which I believe was your plan
then the issue is probably moot.
The only limit then would be on the size of the client executable
itself which would probably still need to fit beneath valgrind. Other
memory allocations and shared libraries used by the client could go
anywhere.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|