skip address tag embedded within the loadable program

This commit is contained in:
bunnie 2024-03-01 23:31:18 +08:00
parent eff977d439
commit 6c6634540c

View file

@ -119,7 +119,8 @@ macro_rules! bio_code {
report_api($name_start as u32);
report_api($name_end as u32);
}
unsafe { core::slice::from_raw_parts($name_start, ($name_end as usize) - ($name_start as usize))}
// skip the first 4 bytes, as they contain the loading offset
unsafe { core::slice::from_raw_parts($name_start.add(4), ($name_end as usize) - ($name_start as usize) - 4)}
}
core::arch::global_asm!(