ideas about threading lib switching

Simon 'corecode' Schubert corecode at
Wed Apr 11 17:18:50 PDT 2007

Simon 'corecode' Schubert wrote:
Have a generic "proxy" lib called or so, which defines 
the available functions and where all binaries can be linked against.  
This lib however does not provide any functionality.  Instead, there 
would be some way that this lib (or rtld, or so)  decides on execution 
time (or whenever it is being runtime linked) which real threading lib 
to load.  Some sort of objformat, just for libs.
Okay, I got it to work.  Remember:  never use ld to link libs, always use gcc (gotta check our makefiles).

Basic principle of operation:

1. have a which defines the available functions as weak references.

2. proxy lib has a constructor which performs a dlopen(), depending on an environment variable or whatever.

however, this does not work for being opened with dlopen().

so, opinions on which way to use?

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: pgp00009.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <>

More information about the Kernel mailing list