File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -112,23 +112,25 @@ macro_rules! entry_point {
112112 $crate:: entry_point!( $path, config = & $crate:: BootloaderConfig :: new_default( ) ) ;
113113 } ;
114114 ( $path: path, config = $config: expr) => {
115- #[ link_section = ".bootloader-config" ]
116- pub static __BOOTLOADER_CONFIG: [ u8 ; $crate:: BootloaderConfig :: SERIALIZED_LEN ] = {
117- // validate the type
118- let config: & $crate:: BootloaderConfig = $config;
119- config. serialize( )
120- } ;
115+ const _: ( ) = {
116+ #[ link_section = ".bootloader-config" ]
117+ pub static __BOOTLOADER_CONFIG: [ u8 ; $crate:: BootloaderConfig :: SERIALIZED_LEN ] = {
118+ // validate the type
119+ let config: & $crate:: BootloaderConfig = $config;
120+ config. serialize( )
121+ } ;
121122
122- #[ export_name = "_start" ]
123- pub extern "C" fn __impl_start( boot_info: & ' static mut $crate:: BootInfo ) -> ! {
124- // validate the signature of the program entry point
125- let f: fn ( & ' static mut $crate:: BootInfo ) -> ! = $path;
123+ #[ export_name = "_start" ]
124+ pub extern "C" fn __impl_start( boot_info: & ' static mut $crate:: BootInfo ) -> ! {
125+ // validate the signature of the program entry point
126+ let f: fn ( & ' static mut $crate:: BootInfo ) -> ! = $path;
126127
127- // ensure that the config is used so that the linker keeps it
128- $crate:: __force_use( & __BOOTLOADER_CONFIG) ;
128+ // ensure that the config is used so that the linker keeps it
129+ $crate:: __force_use( & __BOOTLOADER_CONFIG) ;
129130
130- f( boot_info)
131- }
131+ f( boot_info)
132+ }
133+ } ;
132134 } ;
133135}
134136
You can’t perform that action at this time.
0 commit comments