[PATCH] Prefer locally defined symbols in modules
Matthias Hopf
mhopf at suse.de
Tue Sep 8 09:16:46 PDT 2009
On Sep 08, 09 09:03:30 -0700, Alan Coopersmith wrote:
> I don't see RTLD_DEEPBIND on Solaris, so we'd need some #ifdef's there -
> the closest match I seen in our dlopen() man page would be to turn off
> DLOPEN_GLOBAL and use _LOCAL instead, though using the direct binding
> option to the linker when building the .so's would help.
AFAIU _GLOBAL vs. _LOCAL is about exporting symbols, but we have the
issues with importing symbols. _GLOBAL is only added if required by the
api call, I think drivers are loaded without (while e.g. exa, xaa, etc.
are loaded with).
Also, AFAIU we have to use LAZY because a number of symbols in a number
of drivers fail to resolve (due to bugs), and that would impose us with
more bug reports. And they load acceleration modules only after they are
actually loaded...
> I agree that limiting exported symbols by default seems the best long
> term answer - for most modules, don't they just need to export the
> ModuleData object and the function listed in it to call for initialization?
With drivers, I think that is correct...
And even those symbols are looked up with dlsym.
Matthias
--
Matthias Hopf <mhopf at suse.de> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat at mshopf.de
Phone +49-911-74053-715 __) |_| __) |__ R & D www.mshopf.de
More information about the xorg-devel
mailing list