Add more information to error due to truncated Elf32_Ehdr
Change-Id: I24f30bd0c1120bcf85d77f5c4e69f0fefe9a2478
diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp
index 83f163c..0940305 100644
--- a/linker/linker_phdr.cpp
+++ b/linker/linker_phdr.cpp
@@ -147,7 +147,8 @@
return false;
}
if (rc != sizeof(header_)) {
- DL_ERR("\"%s\" is too small to be an ELF executable", name_);
+ DL_ERR("\"%s\" is too small to be an ELF executable. Expected at least %d bytes, only found %d bytes.",
+ name_, sizeof(header_), rc);
return false;
}
return true;