From 0e79b9196254cdd210a59cc00d07b88a796a3a0d Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Wed, 14 Aug 2013 01:04:19 -0700 Subject: [PATCH] Add more information to error due to truncated Elf32_Ehdr Change-Id: I24f30bd0c1120bcf85d77f5c4e69f0fefe9a2478 --- linker/linker_phdr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp index 83f163c5e..0940305bf 100644 --- a/linker/linker_phdr.cpp +++ b/linker/linker_phdr.cpp @@ -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;