summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2006-07-06 14:22:33 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2006-07-06 14:22:33 -0400
commit704e645207d88a2d0a372cf69f6abd778ed4c30b (patch)
tree8c85f7b7079af5ac53b78add1396291020b66487
parent28b95fd9d1c2f078aaaac75c310a27b17c74a6fc (diff)
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.
-rw-r--r--hw/xfree86/loader/dlloader.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c
index 3c62f863b..7db04b1a0 100644
--- a/hw/xfree86/loader/dlloader.c
+++ b/hw/xfree86/loader/dlloader.c
@@ -105,6 +105,8 @@ DLFindSymbolLocal(pointer module, const char *name)
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;
}