[geeks] Mac definitions

Andrew Jones andrew at jones.ec
Fri Jul 8 18:49:22 CDT 2011


On 07/08/2011 05:50 PM, Jonathan Patschke wrote
>
> If Unix library-search paths were as sane as Windows[0], this would work a
> lot better. I've pondered before a tool that would edit the executable
> header to "firm-code" a path at installation. It's not relying on ld.so's
> configuration, and it's not set by -rpath, but by, say, /usr/bin/install.
> That'd require leaving patch space in the executable header for replacing
> the library name with up to PATH_MAX characters.
>

The rpath *is* the sane way to do this.  In theory, /opt/$VENDOR/ is 
*your* playground, and you're free to hardcode it as much as you want.

I'm told that you can get away with dynamic paths in rpath.  In theory 
you can set the rpath on a Linux ELF binary to "./foo/bar" or 
"../foo/bar" and it will basically work.  I've never had a reason to try it.


More information about the geeks mailing list