xserver: Branch 'master'
Adam Jackson
ajax at kemper.freedesktop.org
Thu Jul 6 21:22:30 EEST 2006
hw/xfree86/loader/dlloader.c | 8 ++++++++
1 files changed, 8 insertions(+)
New commits:
diff-tree 704e645207d88a2d0a372cf69f6abd778ed4c30b (from 28b95fd9d1c2f078aaaac75c310a27b17c74a6fc)
Author: Adam Jackson <ajax at benzedrine.nwnk.net>
Date: Thu Jul 6 14:22:33 2006 -0400
Remind dlloader that it needs to search the global scope as well as the
loaded modules. Fixes LoaderSymbol() on symbols provided by the server.
Spotted by Aaron Plattner.
diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c
index 3c62f86..7db04b1 100644
--- a/hw/xfree86/loader/dlloader.c
+++ b/hw/xfree86/loader/dlloader.c
@@ -105,6 +105,8 @@ DLFindSymbolLocal(pointer module, const
return p;
}
+static void *global_scope = NULL;
+
void *
DLFindSymbol(const char *name)
{
@@ -117,6 +119,12 @@ DLFindSymbol(const char *name)
return p;
}
+ if (!global_scope)
+ global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL);
+
+ if (global_scope)
+ return dlsym(global_scope, name);
+
return NULL;
}
More information about the xorg-commit
mailing list