From owner-freebsd-current@FreeBSD.ORG Thu Oct 9 01:11:25 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B03681065688 for ; Thu, 9 Oct 2008 01:11:24 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-gx0-f21.google.com (mail-gx0-f21.google.com [209.85.217.21]) by mx1.freebsd.org (Postfix) with ESMTP id 53EAA8FC1B for ; Thu, 9 Oct 2008 01:11:24 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by gxk14 with SMTP id 14so8865624gxk.19 for ; Wed, 08 Oct 2008 18:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=Y5frcmgHXS/Z86L8ekzoqjM01yzuyVTifFksEXZdWiU=; b=QYSJpl8F81HL/icEpCnNA7Cs3XU/xWEiCp2qclLdGuBRRQ/3lYVqRugVLmth1TyZvb w2v7xsjI+OyTfTvYvFFlVk3aZNCf7ejrOug0/fvGCcLzz+2fk/HKkh0Oi/AtUooRAhEB I6bbalezpWPIsspJbFaRxJ4O3TnQqdEWQRTto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=hwz+WKmPbdCiG09/VNHjpO8N+6x7V9FBvNbJ36/13p+G7avFXhoNv5Nk/C2L+O88c0 v9/xkZtdzQmTqS+kwjOddTUSdsotIuu3begtPfXGlBKDTW/SyGMBhSr8IoaQbYuzYeXg rfh5tsmjz4fFuJu22BnguDBIVUizKN5VnQtLY= Received: by 10.100.255.17 with SMTP id c17mr2821499ani.62.1223514683361; Wed, 08 Oct 2008 18:11:23 -0700 (PDT) Received: from kan.dnsalias.net (c-24-62-106-68.hsd1.ma.comcast.net [24.62.106.68]) by mx.google.com with ESMTPS id 71sm4857210wry.35.2008.10.08.18.11.22 (version=SSLv3 cipher=RC4-MD5); Wed, 08 Oct 2008 18:11:22 -0700 (PDT) Date: Wed, 8 Oct 2008 21:10:05 -0400 From: Alexander Kabaev To: Maxim Sobolev Message-ID: <20081008211005.0fcb6442@kan.dnsalias.net> In-Reply-To: <48ED5755.3000601@FreeBSD.org> References: <48ED27EA.9020407@FreeBSD.org> <48ED3545.6030609@FreeBSD.org> <20081008192905.0b75b0a6@kan.dnsalias.net> <48ED5755.3000601@FreeBSD.org> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/z22Pe9KDY2i=KhFyUazzYb0"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: "current@freebsd.org" Subject: Re: dlsym(RTLD_NEXT) and weak symbols X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 01:11:25 -0000 --Sig_/z22Pe9KDY2i=KhFyUazzYb0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 08 Oct 2008 17:59:01 -0700 Maxim Sobolev wrote: > Alexander Kabaev wrote: > > On Wed, 08 Oct 2008 15:33:41 -0700 > > Maxim Sobolev wrote: > >> The following patch fixes the issue for me: > >> > > > >=20 > > I do not think your patch is completely correct. How about this one > > instead:=20 >=20 > I see where you go, but I disagree. IMHO symbols in the ld-elf.so.1=20 > should be searched even if there is no matching weak symbol found in=20 > other libraries. Technically, nothing says that the libc should have=20 > those weak symbols for dlopen and friends and also application can > only be linked to ld-elf.so.1, not libc at all, and still > dlsym("dlopen") should work. >=20 > -Maxim Read the patch again please. You do not see where I am going :) We need to grab first non-weak symbol that matches or first weak symbol if no non-weak alternatives are found. =20 --=20 Alexander Kabaev --Sig_/z22Pe9KDY2i=KhFyUazzYb0 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFI7VntQ6z1jMm+XZYRArTeAJ91/SxJzyowkKNxU6xLE9a8b7BEqQCfQdg+ TSMqGWj/9RkRIfnh9qJWruw= =NcP4 -----END PGP SIGNATURE----- --Sig_/z22Pe9KDY2i=KhFyUazzYb0--