rtld enhancement to add osversion sub-directory search

Doug Ambrisko ambrisko at ambrisko.com
Fri Feb 13 13:08:59 PST 2009


David Schultz writes:
| On Thu, Feb 12, 2009, Doug Ambrisko wrote:
| > Kostik Belousov writes:
| > | There is a popular feature, unfortunately, not supported by FreeBSD
| > | ld.so, called Dynamic String Tokens, see
| > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=en&a=view
| > | 
| > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL,
| > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT
| > | without serious conflicts.
| > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch
| > 
| > That is an interesting feature, however, it almost seems backwards for
| > me if I understand it correctly.  I need old binaries to find the library 
| > it was built with and not new ones based on the base OS.  The plus that 
| > I see with their feature is for a library that has been optimized for a 
| > specific type of CPU etc.
| 
| The Solaris rtld features are very useful when you want to
| export a volume with a bunch of apps over NFS, and the clients are
| running different releases or different architectures. It can
| probably also solve your problem if you bother to place different
| library versions in different directories and set your library
| path appropriately.

Unless I missed something it seems to be an inverse feature to 
what I want since it expands based on the current kernel's
uname type results.  I need it to expand based on the original OS
that it was built on.  I'll have to see if my Solaris box at work
has this feature or not.  I can't change LD_LIBRARY_PATH etc.
type things.  Doing ldconfig -m of various things doesn't help
since that can find the wrong one.  My idea was to do something
like what happens for 32bit on 64bit and Linux on FreeBSD in that
it looks at osversion specific places then the standard.

Doug A.


More information about the freebsd-arch mailing list