dlopen/RPATH/RUNPATH
Thorsten Kukuk
kukuk@suse.de
Fri Jun 18 07:21:00 GMT 2004
Hi,
is there somewhere a specification, how dlopen() should handle RPATH
and RUNPATH?
The problem: dlopen() seems only to use RPATH, but if RUNPATH and
RPATH is set, RPATH is ignored and dlopen() does not seem to use
RUNPATH:
$ cat >main.c
#include <dlfcn.h>
#include <stdio.h>
int main(void) {
printf("%p\n", dlopen("libc_copy.so", RTLD_NOW));
}
$ cp /lib/libc.so.6 ./libc_copy.so
$ gcc main.c -Wl,-rpath,. -ldl
(Run it)
If RUNPATH and RPATH is set, it prints (nil) whereas if only
RPATH is set, it prints a meaningful number.
Is this a bug or the expected behavior?
Thanks,
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE Linux AG Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
More information about the Libc-alpha
mailing list