delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/15/10:17:22

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SARE_SUB_ENC_UTF8
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Fri, 15 Jan 2010 16:17:09 +0100
From: "Vincent R." <forumer AT smartmobili DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Re: [cfe-dev] cygwin updates (was: dladdr and =?UTF-8?Q?Dl=5Finfo=29?=
In-Reply-To: <20100115141828.GC4977@calimero.vinschen.de>
References: <3ab31ceedb33b3519257e07931dbdaf5 AT mail DOT smartmobili DOT com> <4B4F7C90 DOT 4030509 AT x-ray DOT at> <4B4F82B1 DOT 3080605 AT users DOT sourceforge DOT net> <4B4F908D DOT 2060709 AT x-ray DOT at> <f5aa3e9b1001141417m19ca7387p776543eecd2b4304 AT mail DOT gmail DOT com> <e2f81e47fcd88e9e77d72a38b650f402 AT mail DOT smartmobili DOT com> <20100115101927 DOT GG22230 AT calimero DOT vinschen DOT de> <686aa375429ae2e4ea39acf503a6a617 AT mail DOT smartmobili DOT com> <20100115141828 DOT GC4977 AT calimero DOT vinschen DOT de>
Message-ID: <cc3377c82bb301a93048d215b570a6e6@mail.smartmobili.com>
X-Sender: forumer AT smartmobili DOT com
User-Agent: RoundCube Webmail/0.2
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Fri, 15 Jan 2010 15:18:28 +0100, Corinna Vinschen
> On Jan 15 11:40, Vincent R. wrote:
>> It's not too difficult to add Dl_info definition (We will support only
>> retrieving path name):
>> 
>> typedef struct 
>> {
>>   const char 	*dli_fname[PATH_MAX];	/* Filename of defining object */
>>   void 		*dli_fbase;      	/* NA */
>>   const char 	*dli_sname;		/* NA */
>>   void 		*dli_saddr;      	/* NA */
>> } Dl_info;
>> 
>> 
>> int dladdr(void *addr, Dl_info *info)
>> {
>>    // see
>>
http://trac.enlightenment.org/e/browser/trunk/PROTO/evil/src/lib/dlfcn/dlfcn.c
>>    // for an implementation   
>> }
> 
> The implementation won't work on Cygwin for functions exported by the
> Cygwin DLL itself.  At least not as you expect it to work.  Every such
> symbol will return the application's pathname in dli_fname.  The reason
> is the way the functions are exported from libcygwin.a.  You always get
> the address of the function stub linked statically to the executable.
> I fear this needs more work for Cygwin.
> 

I understand but I suppose it would work for other dlls and it's not
important if
it doesn't work for cygwin dll itself because until now you didn't need
it.


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019