This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Possibility to add dlinfo() to dlfcn.h?
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 2 Feb 2012 16:25:40 +0100
- Subject: Re: Possibility to add dlinfo() to dlfcn.h?
- References: <4F2AA313.5040409@cs.utoronto.ca>
- Reply-to: cygwin-developers at cygwin dot com
On Feb 2 09:52, Ryan Johnson wrote:
> Hi all,
>
> Before I go off hacking code, is there a particular reason dlinfo()
> is missing from cygwin's dlfcn.h, other than SHTDI? I know it's not
I guess it's a case of SHTNI, too, with N == notice or need. After
all, it doesn't even have a man page.
> strictly a posix function, but it is present in the linux systems I
> have access to and can be rather handy. I considered parsing
> /proc/$$/maps, but that doesn't guarantee the module is actually
> loaded (as opposed to merely mmapped).
>
> Based on past tangles with cygwin's underbelly I would think some
> boilerplate surrounding a call to GetLoadedModules() would suffice.
Not sure about that. What do you want this function for? What's
your use case? Reading the info in dlfcn.h, I don't see how this
function can be useful under Windows:
RTLD_DI_LMID We have no namespace ID
RTLD_DI_LINKMAP Possible, except l_ld doesn't mean anything
RTLD_DI_CONFIGADDR ?
RTLD_DI_SERINFO Would return the DLL search path.
RTLD_DI_SERINFOSIZE Ditto, sizeof
RTLD_DI_ORIGIN There is no $ORIGIN
RTLD_DI_PROFILENAME ?
RTLD_DI_PROFILEOUT ?
RTLD_DI_TLS_MODID We have no PT_TLS segment, and no TLS relocations.
RTLD_DI_TLS_DATA Ditto
Looks like only RTLD_DI_LINKMAP and RTLD_DI_SERINFO{SIZE} may be of
any use. But still, what's your use case?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat