summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/patchelf.cc8
1 files changed, 6 insertions, 2 deletions
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<ElfFileParams>
Elf_Shdr & ElfFile<ElfFileParamNames>::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;
}