diff --git a/src/patchelf.cc b/src/patchelf.cc index bfd9cc1..6363395 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -557,8 +557,12 @@ template Elf_Shdr & ElfFile::findSection(const SectionName & sectionName) { Elf_Shdr * shdr = findSection2(sectionName); - if (!shdr) - error("cannot find section '" + sectionName + "'"); + if (!shdr) { + std::string extraMsg = ""; + if (sectionName == ".interp" || sectionName == ".dynamic" || sectionName == ".dynstr") + extraMsg = ". The input file is most likely statically linked"; + error("cannot find section '" + sectionName + "'" + extraMsg); + } return *shdr; }