Hi All,

Messing about with Dante (the SOCKS5 replacement), I've encountered
some difficulty with run-time linking that I don't understand.

In brief:
 
 $ env LD_PRELOAD=libdsocks.so telnet # works
 $ env LD_PRELOAD=libdsocks.so xchat  # undefined symbol '_gethostbyname'
 $ env LD_PRELOAD=libc.so:libdsocks.so xchat # works

What I don't understand is:
 = Why is the run-time linker failing to find _gethostbyname in libc
   in the second case?  Looking at a ktrace shows that the relative
   order of loading libdsocks.so and libc.so is the same for both
   telnet and xchat, but the latter `doesn't work'.
  
I thought LD_BIND_NOW might be useful here, but it isn't.

The same problem is encountered even if the application is linked
(dynamically) with -ldsocks at build time (i.e. undefined symbol
unless I supply LD_PRELOAD=libc.so).

What might I look for in the build of libdsocks.so that would cause
such?

Thanks for any help!
-- 
Jacques Vidrine / [EMAIL PROTECTED] / [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to