Closed
Description
MULTIBOOT2_HDR
is an address of array, not an array.
#[used]
#[no_mangle]
#[link_section = ".text.multiboot2_header"]
static MULTIBOOT2_HDR: &[u8; 64] = include_bytes!("mb2_hdr_dump.bin");
It should be below.
macrorules! mb2_hdr_bytes
{
()=>
{
include_bytes!("mb2_hdr_dump.bin")
};
}
#[used]
#[no_mangle]
#[link_section = ".text.multiboot2_header"]
static MULTIBOOT2_HDR: [u8; 64] = *include_bytes!("mb2_hdr_dump.bin");
// or static MULTIBOOT2_HDR: [u8; mb2_hdr_bytes!().len()] = *mb2_hdr_bytes!();
Metadata
Metadata
Assignees
Labels
No labels