Possibility to add dlinfo() to dlfcn.h?
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Feb 2 15:26:00 GMT 2012
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
More information about the Cygwin-developers
mailing list