In article <[EMAIL PROTECTED]>,
Jacques A . Vidrine <[EMAIL PROTECTED]> wrote:
> 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

Which version of FreeBSD?

If you have time, please rebuild "src/libexec/rtld-elf" with
DEBUG_FLAGS=-DDEBUG.  Make a copy of your existing
"/usr/libexec/ld-elf.so.1" and then install the debugging version.
Run your first test case like this:

    script Log.1
    env LD_DEBUG=1 LD_PRELOAD=libdsocks.so telnet
    (exit telnet and get out of "script")

and likewise for the failing test case (with a different filename
for script, of course).  Send the output to me and I'll try to
figure out what's happening.

After you're done, you should restore your original (non-debugging)
rtld.  It's more efficient and also probably more secure.

John
-- 
  John Polstra                                               [EMAIL PROTECTED]
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Ch�gyam Trungpa



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

Reply via email to