6502792 integrates a new mmaping system call - mmapobj(2). See PSARC/2008/226.
This system call allows ld.so.1 to throw away all its mapping code. All objects
will simply be opened, and the file descriptor passed to mmapobj(). The kernel
will select the appropriate location to map the file, the use of large pages,
and any other optimization that would be beneficial to the object/system.
ld.so.1's architecture has revolved around a static buffer in which the first
page of any object is mapped, and the inspection of the program header information
to deduce the number and size of mapings that are required to create the segments
of an object. This can all be thrown away. Yes!
The mmapobj_result_t array that is returned from mmapobj() will be used to drive
all other ld.so.1 activities - relocation, symbol lookup, etc.
Individiual mappings from the mmapobj_result_t array can be mprotected/munmaped
as required.