[lsb-discuss] Binary relocatability

Mike Hearn mike at theoretic.com
Thu Mar 6 13:39:51 PST 2003


> If one were to take something from the appdirs discussion some weeks back,
> it would be the lack of such support on linux, etc.

Indeed, appdirs need such a thing pretty badly.

> I believe Darwin does it by building the library loading scheme to be relative to
> the top level app dir.

Libraries are only one part of the problem. In particular you can bind
to a library relative to the binaries path by using the string ${ORIGIN}
when linking or dlopen()ing. That too has disadvantages of course, like,
well, it's not all that useful. The majority of shared libs are shared
(as the name implies), which means that other programs should be able to
locate and use them regardless of prefix.

The main difficulty here is that the library search locations are a part
of the ELF standard, to extend it, we'd either need to hack
LD_LIBRARY_PATH stuff (ugly) or extend the ELF spec.

thanks -mike





More information about the lsb-discuss mailing list