summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2021-08-28 08:29:40 +0200
committerJörg Thalheim <joerg@thalheim.io>2021-08-28 08:29:40 +0200
commit52a5bb061a781daaa6ebb7a1fbf144f37c51a0e9 (patch)
treedadcbc15e0d7e26d168fd28253094c4acd64602f
parent354dd23ed4ba50d0db0e0dfa8d8d0de31bd78771 (diff)
downloadpatchelf-refactoring.tar.gz
when amending rpath don't add empty rpath entriesrefactoring
-rw-r--r--src/patchelf.cc6
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 */