Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 787259D2D for ; Fri, 22 Jun 2012 20:39:13 +0000 (UTC) Received: (qmail 20777 invoked by uid 500); 22 Jun 2012 20:39:13 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 20713 invoked by uid 500); 22 Jun 2012 20:39:13 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 20705 invoked by uid 99); 22 Jun 2012 20:39:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 20:39:13 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sorinm@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ey0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 20:39:06 +0000 Received: by eaak12 with SMTP id k12so1194997eaa.18 for ; Fri, 22 Jun 2012 13:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=3wlsbCm02ow85REP4egY5nZ8miZykeiZQSDs4yB5jfc=; b=0GLOUsVNsGjFV1jEbWlJ3Iq9Ceuu88IYtINQSGOAK4Zgd3SZWn5HlW6wgPqCb7L3B5 xeEEMYRzW7nPF4sPTgVtpeSQE14XGa82UNIxl6MDVxca3PMinEBFO9l5coZAC8ARGify a3NTctrASQmkNPZ1/g9vNhWcu88zqSbHmxDMbvH59IiKytOxejZxWU1GnYq6h/k9XQvs skIDCXCjzJMOt4A0GoMyJusgt8IHQmrR/KzD6W2WYGhX22iBPfj3i8zlQB/IhggSymbB LcgM5iMT8WW544C+QyRB7AHvXgTSv6t1C6G3xCuhhUK0haLVXF4nL3sYyxgUTQ78FybJ +Q3w== Received: by 10.14.40.3 with SMTP id e3mr730456eeb.27.1340397525608; Fri, 22 Jun 2012 13:38:45 -0700 (PDT) Received: from ?IPv6:2a01:e35:2f26:db80:762f:68ff:fee5:8d8? ([2a01:e35:2f26:db80:762f:68ff:fee5:8d8]) by mx.google.com with ESMTPS id m46sm98048438eeh.9.2012.06.22.13.38.44 (version=SSLv3 cipher=OTHER); Fri, 22 Jun 2012 13:38:44 -0700 (PDT) Message-ID: <4FE4D7D3.1000309@gmail.com> Date: Fri, 22 Jun 2012 22:38:43 +0200 From: Sorin Manolache User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: Followup to earlier thread about "How to compiling/link/use Apache module that uses shared library?" References: <20120622152203.KTC2N.197724.imail@eastrmwml214> In-Reply-To: <20120622152203.KTC2N.197724.imail@eastrmwml214> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 2012-06-22 21:22, ohaya@cox.net wrote: > > Does that confirm that they statically linked stuff from openssl (and libcrypto) into libobaccess.so? I think so. Also you can run nm -aC liboaccess.so. The symbols marked with "U" are undefined => they are external to the lib. The functions marked with "T" or "t" are defined by the lib => their code is in the binary. Functions marked with upper-case ("T") are exported, i.e. another module may use the function. Functions marked with lower-case ("t") are not exported. Those functions can be run by other functions in the same module only. If the libcrypto functions in liboaccess were not exported (marked with lower-case letter) you wouldn't have a problem: the functions in liboaccess would execute the libcrypto functions in liboaccess and the functions in mod_ssl would execute the libcrypto functions in your system's libcrypto. But I suppose that's not the case. > Assuming that's the case, is there any way around this? The easiest way would be to have a liboaccess _dynamically_ linked with libcrypto. In this case, the first module between mod_ssl and your module that loads would load libcrypto. When the second module loads, the loader tries to resolve the undefined symbols of the second module and it will find them in the already loaded libcrypto. If you cannot obtain a liboaccess dynamically linked with libcrypto, you _could_ try to recompile mod_ssl such that it does not export any libcrypto functions, but I don't know if it is possible. S