This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Bulk] Re: Using linker scripts with dlopen
On Thu, 2011-07-28 at 12:58 -0700, Roland McGrath wrote:
> > I still get back to the same requirement: How can I dynamically call the
> > shared function? You are telling me that I have to be careful because
> > the ABI might be different. Is that a significant concern when I'm
> > calling a well-known function using the platform's calling sequence?
>
> If the function is "read", then it probably isn't. For the general case,
> there are varying function signatures and symbol versioning to contend with.
I'm sorry if you think I'm belaboring the issue, but please see the
example in the dlopen(3) man page:
// {snip}
handle = dlopen("libm.so", RTLD_LAZY);
// {snip}
And the example in the dlsym man page in The Open Group Base
Specifications Issue 7
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#)
// {snip}
handle = dlopen("/usr/home/me/libfoo.so", RTLD_LOCAL | RTLD_LAZY);
// {snip}
Both examples show the reference to an unversioned shared object.
My interpretation is that this is an intended use case of both POSIX and
GNU/Linux.
Howard