[BOLT] Support files with no symbols
authorAmir Ayupov <aaupov@fb.com>
Tue, 26 Jul 2022 07:07:34 +0000 (00:07 -0700)
committerAmir Ayupov <aaupov@fb.com>
Tue, 26 Jul 2022 07:07:59 +0000 (00:07 -0700)
commit77c19773843dbdf9ab7f3415b001fa1475ef9fa4
treefd87ea4b89e0863e11994b9cc7c6b255fa7a1e40
parent8a13326d184c2829a51d7c00f467ded06412f858
[BOLT] Support files with no symbols

`LastSymbol` handling in `discoverFileObjects` assumes a non-zero number of
symbols in an object file. It's not the case for broken_dynsym.test added in
D130073, and potentially other stripped binaries.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D130544
bolt/lib/Rewrite/RewriteInstance.cpp