This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Update split landing pad check for stripped binaries
Needs ReviewPublic

Authored by nhuhuan on Jul 27 2022, 2:27 AM.

Details

Summary

Landing pad represents catch block, so it needs to be in same function
with callsite. If both reside in two different fragments, we check if
these fragments are siblings.

In nonstripped binaries, we rely on symbol name to verify sibling
relationship. In stripped binaries, we don't have symbol name.

Unlike jump table where it is challenging to detect the size, LSDA uses
an encoding format that reveals its size, even in stripped mode. It
makes sense to trust the correctness of input binaries, and skip the
sibling check only for stripped binaries.

Test Plan:

ninja check-bolt

Diff Detail