This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: feasibility of modifying Linux ld-linux.so to identify whichmapped files are shared libraries
- From: Ray Bryant <raybry at engr dot sgi dot com>
- To: Ian Wienand <ianw at gelato dot unsw dot edu dot au>
- Cc: libc-alpha at sources dot redhat dot com, Peter Chubb <peterc at cse dot unsw dot edu dot au>
- Date: Wed, 11 May 2005 21:44:59 -0500
- Subject: Re: feasibility of modifying Linux ld-linux.so to identify whichmapped files are shared libraries
- References: <428217BE.90308@engr.sgi.com> <20050512011544.GA19854@cse.unsw.EDU.AU>
Ian Wienand wrote:
On Wed, May 11, 2005 at 09:33:34AM -0500, Ray Bryant wrote:
Christoph Hellwig has suggested that instead we modify the dynamic loader
to mark mapped files in kernel memory as being shared libraries; this would
likely be communicated to the kernel via a new MMAP flag.
I can see situations where this could be useful for more than just
your immediate project.
We've demonstrated using IA64 protection keys for sharing TLB entries.
If we knew at mmap() time this was a shared library we could setup
keys then. I think that could work out better than doing it carte
blanche on MAP_SHARED since it might help manage the limited
protection key registers better.
It might also act as an extra hint that this is a good candidate for a
higher order superpage than it may otherwise be allocated.
Not that anyone cares what I think, but I can see how this could be
useful.
-i
ianw@gelato.unsw.edu.au
http://www.gelato.unsw.edu.au
Hi Ian,
What kind of interface do you have in mind here? I was thinking along the
lines of using a program to set some special bits (or add a special section)
to the elf header indicating that a corresponding bit needed to be passed into
mmap/madvise when the segment was mapped into memory by the dynamic loader.
Can you fit into such a scheme or do you need a more general capability?
(It sounds as if you might want to execute an arbitrary function at ld.so
time for each ELF segment, but that goes a bit beyond the scope of what I
was thinking.)
--
Best Regards,
Ray
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
raybry@sgi.com raybry@austin.rr.com
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------