Skip to content

rcore-os/link-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Link Boot

This is a macros crate to link mod to .text.boot or .data.boot section.

Example

#[link_boot::link_boot]
mod boot {
    pub fn fooo() {
        println!("foo");
    }

    pub static BAR: i32 = 1;

    struct Cat {}
}

expand to:

mod boot {
    #[unsafe(link_section = ".text.boot")]
    pub fn fooo() {
        {
            std::io::_print(std::format_args_nl!("foo"));
        };
    }
    #[unsafe(link_section = ".data.boot")]
    pub static BAR: i32 = 1;
    struct Cat {}
}

About

Link mod to boot section

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages