tsocks redefines select, connect and poll.
At _init(void) it gets addresses for real connect with
realconnect = dlsym(RTLD_NEXT, "connect");
or dlopen libconnect and search for symbols
Then if redefines connect by adding the socks routines and uses real connect.
I link with:
gcc -dynamiclib -flat_namespace -undefined suppress -nostdlib -o libtsocks.1.8.dylib tsocks.o common.o parser.o -ldl -lc -L/sw/lib -ldl
(it gives warnings because of multiples definitions)
it produces a usables library darwin can preload. I've put a printf("coucou") into the _init function but it's never executed when darwin use the lib.
Did I forgot something ? or is there a difference between darwin's dynamic libraries support and linux (e.g. different name for _init). I've installed dlcompat and I compile with -ldl in order to use it.
Thanks for your help.
Frederic
Le mercredi, 4 d�c 2002, � 14:15 Europe/Paris, Martin Costabel a �crit :
Frederic VANNIERE wrote:DYLD_INSERT_LIBRARIES, "man dyld"Hello, Is it possible to use LD_PRELOAD with darwin ?
--
Martin
-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel
--
-=[ [EMAIL PROTECTED] ]=-
\ Homere alias Fr�d�ric VANNI�RE |
\ http://www.enseirb.fr/~vanniere |
\ http://www.krow.org |------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ Fink-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-devel
