diff --git a/elf/mold.h b/elf/mold.h index 91ee6e781e..86e78dbd22 100644 --- a/elf/mold.h +++ b/elf/mold.h @@ -2417,8 +2417,6 @@ InputFile::get_string(Context &ctx, const ElfShdr &shdr) { template inline std::string_view InputFile::get_string(Context &ctx, i64 idx) { - assert(idx < elf_sections.size()); - if (elf_sections.size() <= idx) Fatal(ctx) << *this << ": invalid section index: " << idx; return this->get_string(ctx, elf_sections[idx]);