This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: dlopen/RPATH/RUNPATH
- From: Roland McGrath <roland at redhat dot com>
- To: Thorsten Kukuk <kukuk at suse dot de>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 18 Jun 2004 01:47:35 -0700
- Subject: Re: dlopen/RPATH/RUNPATH
Yes, this is the expected behavior.
DT_RPATH is considered obsolete in the current ELF spec. DT_RUNPATH
replaces it. If DT_RUNPATH is present, DT_RPATH is ignored and only
DT_RUNPATH is used, as per the spec.
DT_RUNPATH does not apply in your example, though DT_RPATH does.
DT_RUNPATH only affects the immediate dependencies of the object containing
it, not other things like dlopen. You can either use LD_LIBRARY_PATH, or
if you wish to encode a path in your binary, you can do so by passing an
complete file name including directory to dlopen.
Thanks,
Roland