X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=jpQS EmkAZ0bgZc1Tbribj4bc3Xf8dDZ8lSeczSYKN3aAz4970vOr9praMXNPgwcEQ1Sj JfGYK9Yx9jflY5fs4xDZdrzneukJ3SLqudbhVRNTNYFcEpLu4keh6+j5LT1Bl9BZ hC6JDNhiDXIr8BY+VKbJxGw/mkAzgyQPl5zJg58= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=VAlmJ6g/nZ T72bRZiMVdaFLjhf8=; b=vZGA7u+0TThk+6CyiGWdql3tpbCiaxkMznbwhVgTlc nW8bHABGulXM51YLk9oCSoBctn55r12YB3t8yE9KXGLqA5JXMiWt4Xo/mZoRQTLy bsULBrygnzF172w0qu3BEz4hdd0pXXhPSvVKvLrGNs6bOXlvWC9uewerHUNtvj++ s= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=BAYES_40,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*F:D*net.au, H*i:sk:3a4d250, H*MI:sk:3a4d250, H*f:sk:3a4d250 X-HELO: mail105.syd.optusnet.com.au Date: Fri, 20 May 2016 21:26:18 +1000 From: Duncan Roe To: cygwin AT cygwin DOT com Subject: Re: Help debugging a dll issue Message-ID: <20160520112618.GC12938@dimstar.local.net> Mail-Followup-To: cygwin AT cygwin DOT com References: <3a4d2501-8845-99b6-d58b-544bff5e223f AT cs DOT umass DOT edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a4d2501-8845-99b6-d58b-544bff5e223f@cs.umass.edu> User-Agent: Mutt/1.5.22 (2013-10-16) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=+cDhJlqnNvz9E7c5l3ERGg==:117 a=+cDhJlqnNvz9E7c5l3ERGg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=yrkiwgmsf1kA:10 a=NEAV23lmAAAA:8 a=Fsd8LUSNupOTpceQN1gA:9 a=CjuIK1q_8ugA:10 a=Bn2pgwyD2vrAyMmN8A2t:22 X-IsSubscribed: yes On Fri, May 20, 2016 at 06:37:57AM -0400, Eliot Moss wrote: > On 5/19/2016 11:28 PM, Sam Habiel wrote: > >I had trouble with dlopen in Cygwin, where it did not behave intuitively. In my case, I was > >dlopening libicu and friends. If you search using my name on the Cygwin mailing list, you should be > >able to find out how I resolved the issue. I don't recall exactly what I did, but I think it was > >that Cygwin put everything in a global namespace, and you need to dlsym NULL to grab the function > >addresses. > > I just tried using NULL for the handle in dlsym, and I get the same result as before, and it > does not change between using RTLD_LOCAL or RTLD_GLOBAL in dlopen. > > What I am seeing is that looking up one symbol is giving the value for a totally different > one -- it's not returning an error indication. > > And this same wrong value is what happens if I just allow the natural linking to take place > (which is what I really want to happen -- the dl calls simply help focus the issue). > > I will look up your previous issue, though, to see if there is something else there of use > in this situation. > > Regards -- EM > Hi Eliot, Do you know what is the name of the totally different symbol? (maybe from nm -D) I wrote a "findit" utility a while back - it would be interesting if it gave the same answer for both symbols. If you would git clone https://github.com/duncan-roe/command_line_tools, cd to the findit subdirectory and enter "make" then you will have it. Example use: > 21:23:15$ ./findit cygwin1.dll printf > Found printf in cygwin1.dll at 0x18012ecbe > 21:24:37$ HTH ... Duncan. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple