[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wine MinGW system libraries



On 9/8/21 8:12 PM, Paul Wise wrote:
On 9/8/21 3:13 AM, Simon McVittie wrote:
As far as I understand it, the PE loader used for Wine is part of Wine,
so it has total control over the libraries that it loads and how it loads
them. This means that if Wine developers (the experts on this codebase)
have decided a libcapsule-like approach isn't feasible or isn't desirable,
they are probably right.

Could the PE loader add support for some sort of namespaces and then be
told to load Wine dependencies within a Wine namespace?

Does the Microsoft Windows loader support anything like this?

Recompiling every PE library with special flags or renaming every PE
library with a Wine prefix seems a bit tedious if just the PE loader
and anything that requests Wine deps can use a namespace/capsule/etc.


The closest thing that Windows has is SxS, which is meant to solve I think some of the same problems (well, it's mainly meant to solve the versioning problem that Microsoft dug themselves into). The problem is that I believe it requires the namespace to be effectively hard-coded into the library in question, in the form of a manifest resource.

Unfortunately, while thinking about the answer to this question, I realized another snag, which I think really does make using identically-named dynamic libraries impossible: if system library A loads system library B dynamically, i.e. does the equivalent of a dlopen(), we have no way of knowing which namespace to apply to it. [AFAICT dlmopen() has this problem too, and just isn't meant for that use case.] Even rewriting the import table doesn't help here.


Reply to: