Respect NIX_DONT_SET_RPATH when .so appears in the command line
Unified processing of command line arguments in ld-wrapper broke support for `NIX_DONT_SET_RPATH` and revealed that ld-wrapper adds the directory of its `-plugin` argument to runpath. This pull request fixes that. It treats `dir/libname.so` as `-L dir -l name`, because this is how `ld.so` interprets resulting binary: with `dir` in `RUNPATH` and the bare `libname.so` (without `dir`) in `NEEDED`, it looks for `libname.so` in each `RUNPATH` and chooses the first, even when the linker was invoked with an absolute path to `.so`.
parent
6341cc91
Please register or sign in to comment