Initial forward-edge CFI implementation (#3693)
* Initial forward-edge CFI implementation Give the user the option to start all basic blocks that are targets of indirect branches with the BTI instruction introduced by the Branch Target Identification extension to the Arm instruction set architecture. Copyright (c) 2022, Arm Limited. * Refactor `from_artifacts` to avoid second `make_executable` (#1) This involves "parsing" twice but this is parsing just the header of an ELF file so it's not a very intensive operation and should be ok to do twice. * Address the code review feedback Copyright (c) 2022, Arm Limited. Co-authored-by: Alex Crichton <alex@alexcrichton.com>
This commit is contained in:
@@ -5,13 +5,13 @@ use crate::shared::Definitions as SharedDefinitions;
|
||||
|
||||
fn define_settings(_shared: &SettingGroup) -> SettingGroup {
|
||||
let mut setting = SettingGroupBuilder::new("arm64");
|
||||
let has_lse = setting.add_bool(
|
||||
|
||||
setting.add_bool(
|
||||
"has_lse",
|
||||
"Has Large System Extensions (FEAT_LSE) support.",
|
||||
"",
|
||||
false,
|
||||
);
|
||||
|
||||
setting.add_bool(
|
||||
"has_pauth",
|
||||
"Has Pointer authentication (FEAT_PAuth) support; enables the use of \
|
||||
@@ -44,8 +44,13 @@ fn define_settings(_shared: &SettingGroup) -> SettingGroup {
|
||||
"",
|
||||
false,
|
||||
);
|
||||
setting.add_bool(
|
||||
"use_bti",
|
||||
"Use Branch Target Identification (FEAT_BTI) instructions.",
|
||||
"",
|
||||
false,
|
||||
);
|
||||
|
||||
setting.add_predicate("use_lse", predicate!(has_lse));
|
||||
setting.build()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user