diff --git a/programs/bpf_loader/src/syscalls/mod.rs b/programs/bpf_loader/src/syscalls/mod.rs index d78d92d762..e14f8a2090 100644 --- a/programs/bpf_loader/src/syscalls/mod.rs +++ b/programs/bpf_loader/src/syscalls/mod.rs @@ -40,7 +40,7 @@ use { enable_early_verification_of_account_modifications, error_on_syscall_bpf_function_hash_collisions, libsecp256k1_0_5_upgrade_enabled, limit_secp256k1_recovery_id, reject_callx_r10, - stop_sibling_instruction_search_at_parent, + stop_sibling_instruction_search_at_parent, switch_to_new_elf_parser, }, hash::{Hasher, HASH_BYTES}, instruction::{ @@ -181,7 +181,7 @@ pub fn create_loader<'a>( static_syscalls: false, enable_elf_vaddr: false, reject_rodata_stack_overlap: false, - new_elf_parser: false, + new_elf_parser: feature_set.is_active(&switch_to_new_elf_parser::id()), aligned_memory_mapping: true, // Warning, do not use `Config::default()` so that configuration here is explicit. }; diff --git a/sdk/src/feature_set.rs b/sdk/src/feature_set.rs index 0acf8333d9..4814c4494f 100644 --- a/sdk/src/feature_set.rs +++ b/sdk/src/feature_set.rs @@ -622,6 +622,10 @@ pub mod add_set_tx_loaded_accounts_data_size_instruction { solana_sdk::declare_id!("G6vbf1UBok8MWb8m25ex86aoQHeKTzDKzuZADHkShqm6"); } +pub mod switch_to_new_elf_parser { + solana_sdk::declare_id!("Cdkc8PPTeTNUPoZEfCY5AyetUrEdkZtNPMgz58nqyaHD"); +} + lazy_static! { /// Map of feature identifiers to user-visible description pub static ref FEATURE_NAMES: HashMap = [ @@ -772,6 +776,7 @@ lazy_static! { (delay_visibility_of_program_deployment::id(), "delay visibility of program upgrades #30085"), (apply_cost_tracker_during_replay::id(), "apply cost tracker to blocks during replay #29595"), (add_set_tx_loaded_accounts_data_size_instruction::id(), "add compute budget instruction for setting account data size per transaction #30366"), + (switch_to_new_elf_parser::id(), "switch to new ELF parser #30497"), /*************** ADD NEW FEATURES HERE ***************/ ] .iter()