Looks like this: ```rust extern "Rust" { static __drivers_start: &'static dyn Driver; static __drivers_end: &'static dyn Driver; } macro_rules! driver { ( $name:ident ) => { #[allow(non_snake_case)] mod $name { #[used] #[link_section = ".drivers"] pub static DRIVER: &'static dyn $crate::drivers::Driver = &super::$name; } }; } fn get_drivers(bus_type: BusType) -> impl Iterator { let drivers = unsafe { core::slice::from_raw_parts( &__drivers_start as *const &'static dyn Driver, (&__drivers_end as *const &'static dyn Driver) .offset_from(&__drivers_start as *const &'static dyn Driver) .try_into() .unwrap(), ) }; drivers .into_iter() .filter(move |d| d.driver_data().bus_type == bus_type) .map(|&d| d) }