This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dlopen/RPATH/RUNPATH


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]