DragonFly kernel List (threaded) for 2007-04
DragonFly BSD
DragonFly kernel List (threaded) for 2007-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ideas about threading lib switching


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Wed, 11 Apr 2007 22:19:22 +0200

Steve O'Hara-Smith wrote:
However, I don't know how we can do this.  Does anybody have input,
ideas?  One way would be to use rtld/libmap, like in FreeBSD, but I don't
100% like this approach.  I'd like to find something more elegant.  But
I'm kind of stuck here, maybe somebody has some ideas to contribute?

The thought that comes immediately to mind is that variant symlinks may be of help here.

varsyms do not necessarily help here, because at link time the soname might be stored in the binary, which means that the varsym is not being used at runtime. We would need some way to have a proxy lib at link time, but a varsym at runtime.


AH! (bulb lights up)

how about:

libpthread.so
	proxy lib.  ONLY used for linking, not for runtime usage.
	has set its soname to "librealpthread.so.0"

librealpthread.so.0
	is a varsym link to either one of the threading libs.

-pthread would translate to -lpthread. however, libpthread.so has set a soname, so that this soname will be used by the rtld. this means that all binaries in general obey the ABI (defined functions) defined by libpthread.so, however they will use the lib pointed to by librealpthread.so.0, which then can be libc_r.so.5 or libthread_xu.so.1.

makes sense?

cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]