All tests are passing now

pull/968/head
martinsoees 3 months ago
parent 5276a91846
commit c725b9d69e

@ -39,10 +39,11 @@
//! // Relocate the programs //! // Relocate the programs
//! #[cfg(feature = "std")] //! #[cfg(feature = "std")]
//! let text_sections = std::collections::HashSet::new(); //! let text_sections = std::collections::HashSet::new();
//! let deactivate_maps = std::collections::HashMap::new();
//! #[cfg(not(feature = "std"))] //! #[cfg(not(feature = "std"))]
//! let text_sections = hashbrown::HashSet::new(); //! let text_sections = hashbrown::HashSet::new();
//! object.relocate_calls(&text_sections).unwrap(); //! object.relocate_calls(&text_sections).unwrap();
//! object.relocate_maps(std::iter::empty(), &text_sections).unwrap(); //! object.relocate_maps(std::iter::empty(), &text_sections, &deactivate_maps).unwrap();
//! //!
//! // Run with rbpf //! // Run with rbpf
//! let function = object.functions.get(&object.programs["prog_name"].function_key()).unwrap(); //! let function = object.functions.get(&object.programs["prog_name"].function_key()).unwrap();

@ -238,11 +238,12 @@ impl<'a> EbpfLoader<'a> {
/// ```no_run /// ```no_run
/// use aya::EbpfLoader; /// use aya::EbpfLoader;
/// use aya_obj::generated::bpf_map_type; /// use aya_obj::generated::bpf_map_type;
/// use std::collections::HashSet;
/// ///
/// let mut set = HashSet::new(); /// let mut set = HashSet::new();
/// set.insert(bpf_map_type::BPF_MAP_TYPE_RINGBUF); /// set.insert(bpf_map_type::BPF_MAP_TYPE_RINGBUF);
/// let ebpf = EbpfLoader::new() /// let ebpf = EbpfLoader::new()
/// .disable_maps(set) /// .deactivate_maps(set)
/// .load_file("file.o")?; /// .load_file("file.o")?;
/// # Ok::<(), aya::EbpfError>(()) /// # Ok::<(), aya::EbpfError>(())
/// ``` /// ```

Loading…
Cancel
Save