Add more information to error due to truncated Elf32_Ehdr

Change-Id: I24f30bd0c1120bcf85d77f5c4e69f0fefe9a2478
This commit is contained in:
Brian Carlstrom 2013-08-14 01:04:19 -07:00
parent c933493ac2
commit 0e79b91962

View file

@ -147,7 +147,8 @@ bool ElfReader::ReadElfHeader() {
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;