This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Minimal GCC/Linux shared lib + EH bug example


Mark Mitchell <mark@codesourcery.com> writes:

> It occurs to me that another way to solve these problems is to change
> the rules for loading modules, from the point of view of Python.  The
> whole point of using RTLD_LOCAL is to prevent name clashes between
> modules.
> 
> Why not define that problem away?
> 
> If the rule was that, for example, all externally visible names in the
> loaded modules had to be within namespaces that were assigned by some
> naming authority, or otherwise consistent, then you could load modules
> with RTLD_GLOBAL.
> 
> Yes, I know this is non-trivial, but if you want to use C++, it's the
> practical solution over the medium term.

That indeed is an option: with sys.setdlopenflags, the application can
override Python's default of RTLD_LOCAL.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]