summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-11-18 16:43:50 -0500
committerAdam Jackson <ajax@redhat.com>2019-11-21 14:20:50 -0500
commitab61c16ef07fde6eb7110c63c344c54eb2a2d117 (patch)
tree6d4255da51dff54764e2f3ff052e9ac93298745a /hw/xfree86
parent4308f5d3d1fbd0f5dce81e22c0c3f08c65a7c9d8 (diff)
loader: Make LoaderSymbolFromModule take a ModuleDescPtr
The thing you get back from xf86LoadSubModule is a ModuleDescPtr, not a dlsym handle. We don't expose ModuleDescPtr to the drivers, so change LoaderSymbolFromModule to cast its void * argument to a ModuleDescPtr. Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/loader/loader.c3
-rw-r--r--hw/xfree86/loader/loadmod.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 503c47e3a..2580e93d9 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -135,7 +135,8 @@ LoaderSymbol(const char *name)
void *
LoaderSymbolFromModule(void *handle, const char *name)
{
- return dlsym(handle, name);
+ ModuleDescPtr mod = handle;
+ return dlsym(mod->handle, name);
}
void
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index a93a76aa9..81a3a1dd9 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -776,7 +776,7 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
*errmaj = LDR_NOMEM;
goto LoadModule_fail;
}
- initdata = LoaderSymbolFromModule(ret->handle, p);
+ initdata = LoaderSymbolFromModule(ret, p);
if (initdata) {
ModuleSetupProc setup;
ModuleTearDownProc teardown;