Subject: Re: VM change for R4000
To: None <thorpej@shagadelic.org>
From: Paul Koning <pkoning@equallogic.com>
List: port-mips
Date: 03/14/2005 09:39:51
>>>>> "Jason" == Jason Thorpe <thorpej@shagadelic.org> writes:
Jason> On Mar 12, 2005, at 6:04 PM, Izumi Tsutsui wrote:
>> Then, how can we avoid/handle virtual aliases (especially for
>> userland) on R4600/R5000 machines for now? On my quick tests, all
>> dynamic linked binaries cause VCED on R4400 newsmips.
Jason> That's a good question. Perhaps MIPS shlibs should come with
Jason> a "hint" as to where to load them.
That's trivial to do -- just set the link base address, and then make
use of it in dynamic loader.
I did that once for an experiment, to see if I could use that to avoid
the creation of so many copy-on-write nonshared pages for the "shared"
libs. No luck, because even if a library is loaded at its link
address, it STILL has to be written to relocate any pointers in it.
The reason is that there doesn't seem to be a relocation directive
that says "add the delta of link and map addresses to x". If such a
thing existed then ld.elf_so could be optimized and I'd end up using a
lot fewer memory pages in my embedded system...
paul