forestalling GNU incompatibility - proposal for binary relative dynamic linking
John Reiser
jreiser@BitWagon.com
Tue Jan 25 00:55:00 GMT 2005
Edward Peschko <esp5@pge.com> proposed in libc-alpha@sources.redhat.com
and a few cross-postings:
> What I'd like to do is be able to set up my LD_LIBRARY_PATH
> so that I can reference it from the point of view of the
> *executable*:
>
> setenv LD_LIBRARY_PATH "*/../lib:....."
Richard Henderson <rth@redhat.com> replied in LKML:
> See -Wl,-rpath,'$ORIGIN/../lib/'
Using $ORIGIN like that in -rpath requires that the indicated libc.so.6
be compatbile with the PT_INTERP of the executable (/lib/ld-linux.so.2).
Unfortunately, such compatibility has not always been maintained
in the past, and there can be no guarantee that it will be maintained
in the future.
It seems that the best that can be done is to use an indirect PT_INTERP
for each executable. See http://BitWagon.com/rtldi/rtldi.html
for more info, including an implementation for x86.
--
John Reiser, jreiser@BitWagon.com
More information about the Libc-alpha
mailing list