dlopen/RPATH/RUNPATH
Roland McGrath
roland@redhat.com
Fri Jun 18 08:47:00 GMT 2004
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
More information about the Libc-alpha
mailing list