ideas about threading lib switching
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Wed Apr 11 17:18:50 PDT 2007
Simon 'corecode' Schubert wrote:
Have a generic "proxy" lib called libpthread.so.0 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 proxy.so 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 proxy.so being opened with dlopen().
so, opinions on which way to use?
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00009.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20070411/8d4b4b4e/attachment-0020.obj>
More information about the Kernel
mailing list