ideas about threading lib switching

Simon 'corecode' Schubert corecode at
Wed Apr 11 13:22:26 PDT 2007

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:
	proxy lib.  ONLY used for linking, not for runtime usage.
	has set its soname to ""
	is a varsym link to either one of the threading libs.
-pthread would translate to -lpthread.  however, 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, however they will use the lib pointed to by, which then can be or

makes sense?

Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |      Against  HTML   \
Dude 2c 2 the max   !       Mail + News   / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00007.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <>

More information about the Kernel mailing list