summaryrefslogtreecommitdiff
path: root/dso
diff options
context:
space:
mode:
authorjim <jim@13f79535-47bb-0310-9956-ffa450edef68>2002-04-22 13:15:48 +0000
committerjim <jim@13f79535-47bb-0310-9956-ffa450edef68>2002-04-22 13:15:48 +0000
commitb4879fe7582dd9528433213f5f9964f2424b0374 (patch)
tree24d08c412608a789385d67f4aeaa9366f7932452 /dso
parentacde55635920e1f72521911375bf6e1bb0a43a97 (diff)
downloadlibapr-b4879fe7582dd9528433213f5f9964f2424b0374.tar.gz
To support modules like PHP, which implement their own
loaded extensions, Darwin needs to place their public symbols in the global table. In Rhapsody, we simply set bindNow to False to achieve the same goal. PR: Obtained from: Submitted by: Marko Karppinen <markonen@php.net> Reviewed by: Jim Jagielski, Fred Sanchez git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63294 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r--dso/unix/dso.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/dso/unix/dso.c b/dso/unix/dso.c
index 944fafe15..a9b22b28e 100644
--- a/dso/unix/dso.c
+++ b/dso/unix/dso.c
@@ -126,12 +126,18 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
NSModule os_handle = NULL;
char* err_msg = NULL;
if (NSCreateObjectFileImageFromFile(path, &image) == NSObjectFileImageSuccess) {
-#ifdef NSLINKMODULE_OPTION_PRIVATE
+
+/*
+ * Under Darwin, we want/need to place dynamically loaded extensions'
+ * public symbols into the global symbol table. As long as modules
+ * don't have overlapping symbols, we're golden.
+ */
+#if defined(NSLINKMODULE_OPTION_NONE)
os_handle = NSLinkModule(image, path,
- NSLINKMODULE_OPTION_PRIVATE |
+ NSLINKMODULE_OPTION_NONE |
NSLINKMODULE_OPTION_RETURN_ON_ERROR);
#else
- os_handle = NSLinkModule(image, path, TRUE);
+ os_handle = NSLinkModule(image, path, FALSE);
#endif
NSDestroyObjectFileImage(image);
}