diff options
| -rw-r--r-- | llvm/include/llvm/Object/ELF.h | 3 | ||||
| -rw-r--r-- | llvm/test/Object/invalid.test | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index c40586cffb9..06792e7a38c 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -765,7 +765,8 @@ uint64_t ELFFile<ELFT>::getSymbolIndex(const Elf_Sym *Sym) const { template <class ELFT> const typename ELFFile<ELFT>::Elf_Shdr *ELFFile<ELFT>::section_begin() const { if (Header->e_shentsize != sizeof(Elf_Shdr)) - report_fatal_error("Invalid section header size"); + report_fatal_error( + "Invalid section header entry size (e_shentsize) in ELF header"); return reinterpret_cast<const Elf_Shdr *>(base() + Header->e_shoff); } diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test index 2f42bde6dc6..1d5a70b3487 100644 --- a/llvm/test/Object/invalid.test +++ b/llvm/test/Object/invalid.test @@ -43,4 +43,4 @@ RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck -- INVALID-SECTION-INDEX: Invalid section index RUN: not llvm-readobj -s %p/Inputs/invalid-section-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-SIZE %s -INVALID-SECTION-SIZE: Invalid section header size +INVALID-SECTION-SIZE: Invalid section header entry size (e_shentsize) in ELF header |

