[BOLT] Reintroduce allow-stripped
authorAmir Ayupov <aaupov@fb.com>
Tue, 7 Feb 2023 02:06:54 +0000 (18:06 -0800)
committerAmir Ayupov <aaupov@fb.com>
Tue, 7 Feb 2023 02:08:13 +0000 (18:08 -0800)
commitc8482da779a9cd5fa34c094639942ab4eb515cc1
treef53357f1396fd2c3781f23a1ca3b33e69f12083b
parentbe2f67c4d87deb513ba200ab3f4dba385faf709a
[BOLT] Reintroduce allow-stripped

Reject stripped binaries as a policy.

The core issue with stripped binaries is that we can't detect the presence
of split functions which require extra handling. Therefore BOLT can't ensure
functional correctness of produced binary if the input stripped binary contains
split functions. Supporting such cases is an interesting problem but it goes
against BOLT's intended goal of achieving peak program performance.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D142686
bolt/lib/Rewrite/RewriteInstance.cpp
bolt/test/X86/broken_dynsym.test
bolt/test/X86/is-strip.s