This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
dlopen/RPATH/RUNPATH
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 18 Jun 2004 09:21:13 +0200
- Subject: dlopen/RPATH/RUNPATH
- Organization: SuSE Linux AG, Nuernberg, Germany
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