From owner-freebsd-hackers Mon May 15 22:25:18 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from gw.nectar.com (gw.nectar.com [209.98.143.44]) by hub.freebsd.org (Postfix) with ESMTP id 04DE537BA16 for ; Mon, 15 May 2000 22:25:16 -0700 (PDT) (envelope-from nectar@nectar.com) Received: from bone.nectar.com (bone.nectar.com [10.0.1.105]) by gw.nectar.com (Postfix) with ESMTP id C4D169B10 for ; Tue, 16 May 2000 00:25:14 -0500 (CDT) Received: by bone.nectar.com (Postfix, from userid 1001) id F358B1DA2; Tue, 16 May 2000 00:25:13 -0500 (CDT) Date: Tue, 16 May 2000 00:25:13 -0500 From: "Jacques A . Vidrine" To: freebsd-hackers@freebsd.org Subject: need to borrow a clue re: rtld Message-ID: <20000516002513.A65118@bone.nectar.com> Mail-Followup-To: "Jacques A . Vidrine" , freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i X-Url: http://www.nectar.com/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 / n@nectar.com / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message