This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: kernel DSO


While we're on the subject of the kernel DSO, there are two (closely
related) enhancements which I'd like to propose which would make the
kernel DSO look much more like a normal shared library to user code such
as debuggers.

1) Have the kernel provide a file in /proc whose contents are the kernel
   DSO. 

   Of course you may need more than one for machines with two process
   modes such as x86_64 and, presumably, 64 bit Power.

2) Have ld.so fill in this filename in the link_map entry for the kernel
   DSO.  

   ld.so already extracts the "linux-gate.so.1" name from the
   DSO's image in store, so it shouldn't need to know more than a
   suitable prefix in /proc to generate the file name if the kernel
   uses suitable names in each kernel DSO.

The effect of these two related changes would be to allow programs which
deal with the shared libraries of a process (such as debuggers) to work
with the kernel DSO exactly as they already work with existing shared
libraries.

At present they have to treat the kernel DSO specially because there is
no file which can be read to get its contents (rather one has to delve
it out of the process).

Another possibility would be simply to have the kernel installation
include the kernel DSOs as normal files (rather than in /proc) as part
of the core kernel distribution (after all, they already existed before
they were linked into the kernel !)

Opinions ?

If I could get the /proc changes into the kernel would you accept the
necessary ld.so changes ?

-- 
-- Jim
--
James Cownie	<jcownie@etnus.com>
Etnus, LLC.     +44 117 9071438
http://www.etnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]