diff options
-rw-r--r-- | llvm/include/llvm/Object/ELF.h | 2 | ||||
-rw-r--r-- | llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64 | bin | 473 -> 0 bytes | |||
-rw-r--r-- | llvm/test/Object/invalid.test | 4 |
3 files changed, 0 insertions, 6 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index 302db65bea4..c06fa75231b 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -367,8 +367,6 @@ const typename ELFFile<ELFT>::Elf_Shdr *ELFFile<ELFT>::section_begin() const { if (Header->e_shentsize != sizeof(Elf_Shdr)) report_fatal_error( "Invalid section header entry size (e_shentsize) in ELF header"); - if (Header->e_shoff & (AlignOf<Elf_Shdr>::Alignment - 1)) - report_fatal_error("Invalid address alignment of section headers"); return reinterpret_cast<const Elf_Shdr *>(base() + Header->e_shoff); } diff --git a/llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64 b/llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64 Binary files differdeleted file mode 100644 index c0653d1d1b3..00000000000 --- a/llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64 +++ /dev/null diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test index 1c060f3e6fc..9f5587422d1 100644 --- a/llvm/test/Object/invalid.test +++ b/llvm/test/Object/invalid.test @@ -64,7 +64,3 @@ RUN: FileCheck --check-prefix=INVALID-RELOC-SH-OFFSET %s RUN: not llvm-readobj -r %p/Inputs/invalid-relocation-sec-sh_offset.elf-x86-64 2>&1 | \ RUN: FileCheck --check-prefix=INVALID-RELOC-SH-OFFSET %s INVALID-RELOC-SH-OFFSET: Invalid data was encountered while parsing the file - -RUN: not llvm-readobj -t %p/Inputs/invalid-sections-address-alignment.x86-64 2>&1 | \ -RUN: FileCheck --check-prefix=INVALID-SEC-ADDRESS-ALIGNMENT %s -INVALID-SEC-ADDRESS-ALIGNMENT: Invalid address alignment of section headers |