diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs index 2b95d232..890cf87b 100644 --- a/aya/src/obj/mod.rs +++ b/aya/src/obj/mod.rs @@ -35,7 +35,7 @@ pub struct Object { pub(crate) maps: HashMap, pub(crate) programs: HashMap, pub(crate) relocations: HashMap>, - pub(crate) symbol_table: HashMap, + pub(crate) symbols_by_index: HashMap, } #[derive(Debug, Clone)] @@ -113,7 +113,7 @@ impl Object { if let Some(symbol_table) = obj.symbol_table() { for symbol in symbol_table.symbols() { - bpf_obj.symbol_table.insert( + bpf_obj.symbols_by_index.insert( symbol.index(), Symbol { name: symbol.name().ok().map(String::from), @@ -137,7 +137,7 @@ impl Object { maps: HashMap::new(), programs: HashMap::new(), relocations: HashMap::new(), - symbol_table: HashMap::new(), + symbols_by_index: HashMap::new(), } } diff --git a/aya/src/obj/relocation.rs b/aya/src/obj/relocation.rs index c881f774..174242d0 100644 --- a/aya/src/obj/relocation.rs +++ b/aya/src/obj/relocation.rs @@ -61,7 +61,7 @@ impl Object { .map(|map| (map.obj.section_index, map)) .collect::>(); - let symbol_table = &self.symbol_table; + let symbol_table = &self.symbols_by_index; for (program_name, program) in self.programs.iter_mut() { if let Some(relocations) = self.relocations.get(&program.section_index) { relocate_program(program, relocations, &maps_by_section, symbol_table).map_err(