aboutsummaryrefslogtreecommitdiff
path: root/bolt/lib/Utils/CommandLineOpts.cpp
diff options
context:
space:
mode:
authorKristof Beyls <kristof.beyls@arm.com>2024-12-12 11:06:27 +0100
committerGitHub <noreply@github.com>2024-12-12 10:06:27 +0000
commitceb7214be0287f536b292a41f8a7dc2e1467d72d (patch)
tree8488513021f31c32d5e5fdc5ef27cb67e5cf22b0 /bolt/lib/Utils/CommandLineOpts.cpp
parent5ca26d769deedc931ce19b4a68a68c799f8d7564 (diff)
downloadllvm-ceb7214be0287f536b292a41f8a7dc2e1467d72d.zip
llvm-ceb7214be0287f536b292a41f8a7dc2e1467d72d.tar.gz
llvm-ceb7214be0287f536b292a41f8a7dc2e1467d72d.tar.bz2
[BOLT] Introduce binary analysis tool based on BOLT (#115330)
This initial commit does not add any specific binary analyses yet, it merely contains the boilerplate to introduce a new BOLT-based tool. This basically combines the 4 first patches from the prototype pac-ret and stack-clash binary analyzer discussed in RFC https://discourse.llvm.org/t/rfc-bolt-based-binary-analysis-tool-to-verify-correctness-of-security-hardening/78148 and published at https://github.com/llvm/llvm-project/compare/main...kbeyls:llvm-project:bolt-gadget-scanner-prototype The introduction of such a BOLT-based binary analysis tool was proposed and discussed in at least the following places: - The RFC pointed to above - EuroLLVM 2024 round table https://discourse.llvm.org/t/summary-of-bolt-as-a-binary-analysis-tool-round-table-at-eurollvm/78441 The round table showed quite a few people interested in being able to build a custom binary analysis quickly with a tool like this. - Also at the US LLVM dev meeting a few weeks ago, I heard interest from a few people, asking when the tool would be available upstream. - The presentation "Adding Pointer Authentication ABI support for your ELF platform" (https://llvm.swoogo.com/2024devmtg/session/2512720/adding-pointer-authentication-abi-support-for-your-elf-platform) explicitly mentioned interest to extend the prototype tool to verify correct implementation of pauthabi.
Diffstat (limited to 'bolt/lib/Utils/CommandLineOpts.cpp')
-rw-r--r--bolt/lib/Utils/CommandLineOpts.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp
index de82420..17f090a 100644
--- a/bolt/lib/Utils/CommandLineOpts.cpp
+++ b/bolt/lib/Utils/CommandLineOpts.cpp
@@ -29,6 +29,7 @@ const char *BoltRevision =
namespace opts {
bool HeatmapMode = false;
+bool BinaryAnalysisMode = false;
cl::OptionCategory BoltCategory("BOLT generic options");
cl::OptionCategory BoltDiffCategory("BOLTDIFF generic options");
@@ -38,6 +39,7 @@ cl::OptionCategory BoltOutputCategory("Output options");
cl::OptionCategory AggregatorCategory("Data aggregation options");
cl::OptionCategory BoltInstrCategory("BOLT instrumentation options");
cl::OptionCategory HeatmapCategory("Heatmap options");
+cl::OptionCategory BinaryAnalysisCategory("BinaryAnalysis options");
cl::opt<unsigned> AlignText("align-text",
cl::desc("alignment of .text section"), cl::Hidden,