Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 2000 09:37:44 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        n@nectar.com
Cc:        hackers@freebsd.org
Subject:   Re: need to borrow a clue re: rtld
Message-ID:  <200005161637.JAA82865@vashon.polstra.com>
In-Reply-To: <20000516002513.A65118@bone.nectar.com>
References:  <20000516002513.A65118@bone.nectar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20000516002513.A65118@bone.nectar.com>,
Jacques A . Vidrine <n@nectar.com> 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                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005161637.JAA82865>