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


On Wed, 2004-09-15 at 19:33, James Cownie wrote:

> 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.

The debugger can surely get to the DSO mapped in RAM, via the AT entry
for example, or glibc could export the entry point... adding more cruft
to /proc will probably not happen.
 
> 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.

I wonder if something in /sys would be acceptable... I don't like the
idea much though

> 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 !)

The latest is not realistic as the DSO can be "fixed" up, at least on
ppc/ppc64, by the kernel depending on the CPU you are booting on.

> Opinions ?
> 
> If I could get the /proc changes into the kernel would you accept the
> necessary ld.so changes ?
-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>


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