diff --git a/src/patchelf.cc b/src/patchelf.cc index acc1e0e8..35a5dc1c 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -1459,6 +1459,11 @@ void ElfFile::modifySoname(sonameMode op, const std::string & template void ElfFile::setInterpreter(const std::string & newInterpreter) { + if (getInterpreter() == newInterpreter) { + debug("given interpreter is already set\n"); + return; + } + std::string & section = replaceSection(".interp", newInterpreter.size() + 1); setSubstr(section, 0, newInterpreter + '\0'); changed = true;