Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Add missing feature gating logic for allowing e_machine == EM_SBF. (#441
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Lichtso authored Feb 17, 2023
1 parent d0e3b7e commit b7c0cfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ impl<C: ContextObject> Executable<C> {
if header.e_ident.ei_osabi != ELFOSABI_NONE {
return Err(ElfError::WrongAbi);
}
if header.e_machine != EM_BPF && header.e_machine != EM_SBF {
if header.e_machine != EM_BPF && (!config.new_elf_parser || header.e_machine != EM_SBF) {
return Err(ElfError::WrongMachine);
}
if header.e_type != ET_DYN {
Expand Down

0 comments on commit b7c0cfd

Please sign in to comment.