mirror of
https://github.com/NixOS/patchelf.git
synced 2025-10-19 02:23:15 +08:00
when amending rpath don't add empty rpath entries
This commit is contained in:
@@ -1459,12 +1459,14 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op,
|
|||||||
if (!rpath) {
|
if (!rpath) {
|
||||||
debug("no RPATH to shrink\n");
|
debug("no RPATH to shrink\n");
|
||||||
return;
|
return;
|
||||||
}
|
;}
|
||||||
newRPath = shrinkRPath(rpath, neededLibs, allowedRpathPrefixes);
|
newRPath = shrinkRPath(rpath, neededLibs, allowedRpathPrefixes);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case rpAdd: {
|
case rpAdd: {
|
||||||
newRPath = std::string(rpath ? rpath : "") + ":" + newRPath;
|
auto temp = std::string(rpath ? rpath : "");
|
||||||
|
appendRPath(temp, newRPath);
|
||||||
|
newRPath = temp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case rpSet: { break; } /* new rpath was provied as input to this function */
|
case rpSet: { break; } /* new rpath was provied as input to this function */
|
||||||
|
Reference in New Issue
Block a user