This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Update sibling relationship from LSDA Section
Needs ReviewPublic

Authored by nhuhuan on Jul 27 2022, 1:25 PM.

Details

Summary

LSDA Section is encoded in an unambiguous manner, allows accurate
reconstruction of landing pads. By definition, split landing pads
must target same function. If a function is splitted, split landing
pads indicate that the target function is a sibling fragment.

When processing stripped binaries, BOLT leverages this information
to support split jump table analysis. For that, sibling inference
needs to run before branch target analysis.

In this update, sibling validation/inference is decoupled from other
tasks, e.g., register labels for landing pads, and is placed before
branch target analysis. This also requires decoupled getting LSDA
Address from processing other CFI Info.

Test Plan:

ninja check-bolt

Diff Detail

Event Timeline

nhuhuan created this revision.Jul 27 2022, 1:25 PM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
nhuhuan requested review of this revision.Jul 27 2022, 1:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2022, 1:25 PM

Can we add more testing that exercises the new code paths being added here?