Skip to content

Commit a628913

Browse files
committed
Update ELF laoder version mapping
1 parent df2d2e2 commit a628913

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/ballet/sbpf/fd_sbpf_loader.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,14 +1466,8 @@ fd_sbpf_program_get_sbpf_version_or_err( void const * bin,
14661466
}
14671467
uint e_flags = FD_LOAD( uint, bin+E_FLAGS_OFFSET );
14681468

1469-
uint sbpf_version = 0U;
1470-
if( FD_UNLIKELY( config->sbpf_max_version==FD_SBPF_V0 ) ) {
1471-
/* https://github.com/anza-xyz/sbpf/blob/v0.12.2/src/elf.rs#L384-L388 */
1472-
sbpf_version = e_flags==E_FLAGS_SBPF_V2 ? FD_SBPF_RESERVED : FD_SBPF_V0;
1473-
} else {
1474-
/* https://github.com/anza-xyz/sbpf/blob/v0.12.2/src/elf.rs#L390-L396 */
1475-
sbpf_version = e_flags < FD_SBPF_VERSION_COUNT ? e_flags : FD_SBPF_RESERVED;
1476-
}
1469+
/* https://github.com/anza-xyz/sbpf/blob/v0.13.0/src/elf.rs#L382-L390 */
1470+
uint sbpf_version = ( e_flags < FD_SBPF_VERSION_COUNT ) ? e_flags : FD_SBPF_RESERVED;
14771471

14781472
/* https://github.com/anza-xyz/sbpf/blob/v0.12.2/src/elf.rs#L399-L401 */
14791473
if( FD_UNLIKELY( !( config->sbpf_min_version <= sbpf_version && sbpf_version <= config->sbpf_max_version ) ) ) {

0 commit comments

Comments
 (0)