From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 16 13:26:37 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EC83216A4DE for ; Sun, 16 Jul 2006 13:26:37 +0000 (UTC) (envelope-from Roland.Dittel@web.de) Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F04943D46 for ; Sun, 16 Jul 2006 13:26:37 +0000 (GMT) (envelope-from Roland.Dittel@web.de) Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id 0513B98C832; Sun, 16 Jul 2006 15:26:36 +0200 (CEST) Received: from [88.64.224.55] (helo=freebsd.localnet) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.107 #114) id 1G26dn-0007WW-00; Sun, 16 Jul 2006 15:26:35 +0200 Received: from [192.168.99.21] (apple.localnet [192.168.99.21]) by freebsd.localnet (8.13.6/8.13.1) with ESMTP id k6GDQUao022500; Sun, 16 Jul 2006 15:26:30 +0200 (CEST) (envelope-from Roland.Dittel@web.de) In-Reply-To: <44BA31FE.7070200@fs.ei.tum.de> References: <62d3f75eb4400604406fdea341d91e41@web.de> <44B92FD7.90801@fs.ei.tum.de> <44BA1B7B.8000305@web.de> <44BA31FE.7070200@fs.ei.tum.de> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Roland Dittel Date: Sun, 16 Jul 2006 15:26:33 +0200 To: "Simon 'corecode' Schubert" X-Mailer: Apple Mail (2.624) Sender: Roland.Dittel@web.de X-Sender: Roland.Dittel@web.de Cc: hackers@freebsd.org Subject: Re: dlsym() on implicit loaded symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2006 13:26:38 -0000 Am 16.07.2006 um 14:33 schrieb Simon 'corecode' Schubert: > Roland Dittel wrote: >>>> We have a issue with dlsym() on symbols imported by a library that=20= >>>> was loaded with dlopen(). Our code loads the libssl with dlopen()=20= >>>> and then do a dlsym() on several symbols. This works for all=20 >>>> symbols exported by libssl itself but fails for symbols exported by=20= >>>> libcrypto. > [..] >> func =3D dlsym(handle, "CRYPTO_set_id_callback"); > > you have to use RTLD_DEFAULT instead of handle, but I agree, this is=20= > not in conformance with SUSv3: That's it. Thank you very much. Roland > > The dlsym() function shall search for the named symbol in all=20 > objects loaded automatically as a result of loading the object=20 > referenced by handle (see dlopen()). Load ordering is used in dlsym()=20= > operations upon the global symbol object. The symbol resolution=20 > algorithm used shall be dependency order as described in dlopen(). > > The RTLD_DEFAULT and RTLD_NEXT flags are reserved for future use. > > Note "in all objects loaded automatically". Good catch! > > cheers > simon > > --=20 > Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon = /"\ > Work - Mac +++ space for low =80=80=80 NOW!1 +++ Campaign = \ / > Party Enjoy Relax | http://dragonflybsd.org Against HTML \ > Dude 2c 2 the max ! http://golden-apple.biz Mail + News / = \ >