mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Improve error message.
Thanks to Sean Silva for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -765,7 +765,8 @@ uint64_t ELFFile<ELFT>::getSymbolIndex(const Elf_Sym *Sym) const {
|
|||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
const typename ELFFile<ELFT>::Elf_Shdr *ELFFile<ELFT>::section_begin() const {
|
const typename ELFFile<ELFT>::Elf_Shdr *ELFFile<ELFT>::section_begin() const {
|
||||||
if (Header->e_shentsize != sizeof(Elf_Shdr))
|
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);
|
return reinterpret_cast<const Elf_Shdr *>(base() + Header->e_shoff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,4 +43,4 @@ RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --
|
|||||||
INVALID-SECTION-INDEX: Invalid section index
|
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
|
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
|
||||||
|
Reference in New Issue
Block a user