This repository was archived by the owner on Jan 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ use crate::{
27
27
use crate :: jit:: { JitCompiler , JitProgram } ;
28
28
use byteorder:: { ByteOrder , LittleEndian } ;
29
29
use std:: {
30
- borrow:: Cow ,
31
30
collections:: { btree_map:: Entry , BTreeMap } ,
32
31
fmt:: Debug ,
33
32
mem,
@@ -1075,12 +1074,7 @@ impl<C: ContextObject> Executable<C> {
1075
1074
let mut program_header: Option < & Elf64Phdr > = None ;
1076
1075
1077
1076
// Fixup all the relocations in the relocation section if exists
1078
- for relocation in elf
1079
- . dynamic_relocations_table ( )
1080
- . unwrap_or ( & [ ] )
1081
- . iter ( )
1082
- . map ( Cow :: Borrowed )
1083
- {
1077
+ for relocation in elf. dynamic_relocations_table ( ) . unwrap_or ( & [ ] ) . iter ( ) {
1084
1078
let mut r_offset = relocation. r_offset as usize ;
1085
1079
1086
1080
// When sbpf_version.enable_elf_vaddr()=true, we allow section.sh_addr !=
@@ -1347,14 +1341,7 @@ impl<C: ContextObject> Executable<C> {
1347
1341
1348
1342
if config. enable_symbol_and_section_labels {
1349
1343
// Register all known function names from the symbol table
1350
- for symbol in elf
1351
- . symbol_table ( )
1352
- . ok ( )
1353
- . flatten ( )
1354
- . unwrap_or ( & [ ] )
1355
- . iter ( )
1356
- . map ( Cow :: Borrowed )
1357
- {
1344
+ for symbol in elf. symbol_table ( ) . ok ( ) . flatten ( ) . unwrap_or ( & [ ] ) . iter ( ) {
1358
1345
if symbol. st_info & 0xEF != 0x02 {
1359
1346
continue ;
1360
1347
}
You can’t perform that action at this time.
0 commit comments