This is a fix for https://bugs.llvm.org/show_bug.cgi?id=41775,
I checked that we do not actually need this line,
since we always call removeSectionReferences which calls removeSymbols which
updates the Size:
Error SymbolTableSection::removeSymbols( function_ref<bool(const Symbol &)> ToRemove) { Symbols.erase( std::remove_if(std::begin(Symbols) + 1, std::end(Symbols), [ToRemove](const SymPtr &Sym) { return ToRemove(*Sym); }), std::end(Symbols)); Size = Symbols.size() * EntrySize; assignIndices(); return Error::success(); }
But I think it worth to fix this assignment instead of removing it,
that allows to relax the dependencies.