From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 16 10:57:08 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 5F50916A4DE for ; Sun, 16 Jul 2006 10:57:08 +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 ADB8343D53 for ; Sun, 16 Jul 2006 10:57:07 +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 69EE5988922; Sun, 16 Jul 2006 12:57:06 +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 1G24J7-0004kC-00; Sun, 16 Jul 2006 12:57:06 +0200 Received: from [192.168.99.22] (notebook.localnet [192.168.99.22]) by freebsd.localnet (8.13.6/8.13.1) with ESMTP id k6GAv25p022142; Sun, 16 Jul 2006 12:57:03 +0200 (CEST) (envelope-from Roland.Dittel@web.de) Message-ID: <44BA1B7B.8000305@web.de> Date: Sun, 16 Jul 2006 12:56:59 +0200 From: Roland Dittel User-Agent: Thunderbird 1.5.0.4 (X11/20060617) MIME-Version: 1.0 To: "Simon 'corecode' Schubert" References: <62d3f75eb4400604406fdea341d91e41@web.de> <44B92FD7.90801@fs.ei.tum.de> In-Reply-To: <44B92FD7.90801@fs.ei.tum.de> Content-Type: multipart/mixed; boundary="------------000906080702090603030500" Sender: Roland.Dittel@web.de X-Sender: Roland.Dittel@web.de X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 10:57:08 -0000 This is a multi-part message in MIME format. --------------000906080702090603030500 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Simon 'corecode' Schubert wrote: > Roland Dittel wrote: >> Hi all, >> >> We have a issue with dlsym() on symbols imported by a library that was >> loaded with dlopen(). Our code loads the libssl with dlopen() and then >> do a dlsym() on several symbols. This works for all symbols exported >> by libssl itself but fails for symbols exported by libcrypto. Libssl >> is dynamically linked to libcrypto and should be loaded for libssl. I >> did a truss and the FreeBSD loader loads libcrypto but does not read >> anything from the file pointer. > > could you post a sample code fragment which illustrates the problem you > are seeing? Sure, attached is a simple example that tries to load the symbol CRYPTO_set_id_callback from a libssl handle. The symbol is located in libcrypto and NOT in libssl. Because libssl is dynamically linked to libcrypto I would expect the loader is able to find the symbol, but that's not the case on freebsd. > > cheers > simon > --------------000906080702090603030500--