This reverts commit r263664.
The reason we were getting broken files was lld -r, and that has been
fixed.
llvm-svn: 263944
if (Flags & SHF_WRITE)
fatal("writable SHF_MERGE sections are not supported");
uintX_t EntSize = Sec.sh_entsize;
- if (!EntSize)
- return false;
- if (Sec.sh_size % EntSize)
+ if (!EntSize || Sec.sh_size % EntSize)
fatal("SHF_MERGE section size must be a multiple of sh_entsize");
// Don't try to merge if the aligment is larger than the sh_entsize and this
# RUN: FileCheck --check-prefix=INVALID-SECTION-INDEX %s
# INVALID-SECTION-INDEX: Invalid section index
+# RUN: not ld.lld %p/Inputs/invalid-shentsize-zero.elf -o %t2 2>&1 | \
+# RUN: FileCheck --check-prefix=INVALID-SHENTSIZE-ZERO %s
+# INVALID-SHENTSIZE-ZERO: SHF_MERGE section size must be a multiple of sh_entsize
+
# RUN: not ld.lld %p/Inputs/invalid-multiple-eh-relocs.elf -o %t2 2>&1 | \
# RUN: FileCheck --check-prefix=INVALID-EH-RELOCS %s
# INVALID-EH-RELOCS: multiple relocation sections to .eh_frame are not supported
+++ /dev/null
-# RUN: ld.lld %p/Inputs/merge-shentsize-zero.elf -o %t2 2>&1 | \
-# RUN: FileCheck -allow-empty %s
-# CHECK-NOT: SHF_MERGE section size must be a multiple of sh_entsize
-