This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: dlopen vs. RUNPATH
- From: ludo at gnu dot org (Ludovic CourtÃs)
- To: libc-help at sourceware dot org
- Date: Sun, 17 Nov 2013 18:25:23 +0100
- Subject: Re: dlopen vs. RUNPATH
- Authentication-results: sourceware.org; auth=none
- References: <87wqk773d2 dot fsf at gnu dot org>
ludo@gnu.org (Ludovic CourtÃs) skribis:
> I have a use case where libgcc_s.so fails to be dlopenâd, even though
> its directory is in the main applicationâs RUNPATH:
On further inspection, I think the explanation is that
pthread_cancel_init uses __libc_dlopen, which causes libpthreadâs name
space (its âlink_mapâ) to be used, not the applicationâs name space.
Neither libpthreadâs RUNPATH nor $LD_LIBRARY_PATH points to the
directory of libgcc_s, hence the failure (conversely,
dlopen("libgcc_s.so") from the application succeeds.)
One possible fix would be to augment $(user-defined-trusted-dirs).
Ludoâ.