Re: Binary relocatability

Mike Hearn <[email protected]>
Newsgroups gmane.linux.lsb.discuss
Message-ID <[email protected]>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.