This is the mail archive of the libc-help@sourceware.org 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: A possible libc/dlmopen/pthreads bug


This concept of "shim" libraries will only work for some
limited set of libraries that are relatively stateless
(and as you see glibc is not).

In my use case the shim library arranges for there to be only one
copy of the library being shimmed - the main namespace "thinks"
it has a copy of the library, but there's actually no code there,
only enough ELF data that it thinks linking can work: Since there's
only one copy even stateful libraries work (but see later).

The shim makes sure the same function pointers are used both inside
and outside the namespace *for the target library only*, not any
further dependencies.

*However* for the libc cluster we really do want there to be only one
copy, since shimming cannot occur until _after_ libc has been mapped
(since libc is pretty fundamental).

I'll see if I can understand the dl[m]open worker code well enough to
provide a patch.


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