delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/06/03/10:07:38

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Message-ID: <023c01c0ec36$7da728f0$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin-developers AT cygwin DOT com>
References: <016201c0ebfd$f8036840$0200a8c0 AT lifelesswks> <20010603094842 DOT E23205 AT redhat DOT com>
Subject: Re: dlsym discussion..
Date: Mon, 4 Jun 2001 00:07:13 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 03 Jun 2001 13:58:28.0801 (UTC) FILETIME=[44335310:01C0EC35]

---- Original Message -----
From: "Christopher Faylor" <cgf AT redhat DOT com>
> >Thoughts? I'm a bit hesitant at trying to second guess what dll's
have
> >been implicitly loaded by the Win32System, but if that information is
> >readily available to cygwin, I'm happy to code up a iterating
dlsym().
>
> cygwin keeps a list of DLLs loaded via dlopen.  It could register
other
> modules via dll_entry() but that is not a foolproof method due to load
> order problems.

BTW: There's no rush on this for me - it doesn't affect what I'm doing -
I'm just interested in seeing if I can find a way to provide the unix
dlsym behaviour. Likewise no-one in userland is complaining about this,
so I hope it won't suddenly become an issue.

Hmm. Well it seems to me there are two sets of dlls: implicitly loaded
dll's that we were linked against, and
"modules"/"plugins"/whateveryouwanttocallthem that get dlopened.

Both should behave the same, but the key difference is that implicitly
loaded dll's should be visible to a dlopen(NULL,);dlsym() combination,
whereas "modules" will give us access to a path name. Thus tracking via
dlopen()'s isn't likely to provide a comprehensive list.

I'm starting to suspect that to do this we'll need something nasty like
calculating the dependencies for the current exe, and then finding via
the search path and GetModuleHandle() [to test if the dll is the one in
memory)].

If by, dll_entry() you mean inserting some custom notification code in
every cygwin compiled dll to allow us to be told as dll's load, that has
the downside of not working with any existing or non-cygwin dll,
something that I'd rather avoid.

Anyone happen to know where to get source for ldd ?

Rob

>
> cgf
>

- Raw text -


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