Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Support a special pathname syntax for apr_dso_load()/dlopen() so
that an APR app can open shared libraries that for whatever reason
(e.g., libtool) have been stuffed in an archive.

This special archive.a(dso.so) syntax is required for the way libtool
likes to build shared libraries on AIX.  dlopen() support for such a
library requires that the RTLD_MEMBER flag be enabled.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62582 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
trawick committed Nov 30, 2001
1 parent 4789d64 commit c27f8d2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion dso/unix/dso.c
Expand Up @@ -139,7 +139,20 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);

#else
void *os_handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
int flags = RTLD_NOW | RTLD_GLOBAL;
void *os_handle;
#ifdef _AIX
if (strchr(path + 1, '(') && path[strlen(path) - 1] == ')')
{
/* This special archive.a(dso.so) syntax is required for
* the way libtool likes to build shared libraries on AIX.
* dlopen() support for such a library requires that the
* RTLD_MEMBER flag be enabled.
*/
flags |= RTLD_MEMBER;
}
#endif
os_handle = dlopen(path, flags);
#endif
#endif /* DSO_USE_x */

Expand Down

0 comments on commit c27f8d2

Please sign in to comment.