This is the mail archive of the 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]

How executable's RPATH/RUNPATH affects .so's dlopen

What I'm observing (at least with Fedora 17 glibc 2.15) is the following:

I have an executable E that links to, and in turn calls dlopen("") (w/o a slash in the path). All of E,, are in the same directory, and has neither RPATH nor RUNPATH settings.

Now, if E contains RPATH=$ORIGIN but no RUNPATH,'s call to dlopen("") will search on E's RPATH and succeed.

However, if E contains both RPATH=$ORIGIN and RUNPATH=$ORIGIN,'s call to dlopen("") will neither search on E's RPATH (which is clearly by design) nor on E's RUNPATH (*) and fail.

From the information I find (<> "RUNPATH behaviour is not transitive," linking to <> "Re: [PATCH] Honor executables DT_RUNPATH for dlopen"), it looks like (*) is by design rather than in error, but I'm not entirely sure, as it would contradict the dlopen(3) manpage: "If the executable file for the calling program contains a DT_RUNPATH tag, then the directories listed in that tag are searched."

Can anybody clarify this?


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