> Just found I can set LD_DEBUG to see the full translation process of ld.so. > This seems to confirm what I've seen in the source: ld.so uses cwd > instead of process file location for $ORIGIN interpolation. ^^^^^^^^^^^^^^^^^^^^^
What is that? Generally Unix has no way of doing this. You can inspect your executable's __progname, which is cloned from argv at crt startup, but it may not contain an absolute path. So what do you really mean here?