diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2021-08-28 08:29:40 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2021-08-28 08:29:40 +0200 |
commit | 52a5bb061a781daaa6ebb7a1fbf144f37c51a0e9 (patch) | |
tree | dadcbc15e0d7e26d168fd28253094c4acd64602f /src | |
parent | 354dd23ed4ba50d0db0e0dfa8d8d0de31bd78771 (diff) | |
download | patchelf-refactoring.tar.gz |
when amending rpath don't add empty rpath entriesrefactoring
Diffstat (limited to 'src')
-rw-r--r-- | src/patchelf.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index f05f75c..d5b5f72 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -1459,12 +1459,14 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op, if (!rpath) { debug("no RPATH to shrink\n"); return; - } + ;} newRPath = shrinkRPath(rpath, neededLibs, allowedRpathPrefixes); break; } case rpAdd: { - newRPath = std::string(rpath ? rpath : "") + ":" + newRPath; + auto temp = std::string(rpath ? rpath : ""); + appendRPath(temp, newRPath); + newRPath = temp; break; } case rpSet: { break; } /* new rpath was provied as input to this function */ |