Introduce Overlay Header and LBAs

This commit is contained in:
2022-12-04 04:55:53 +01:00
parent 8a54e5f1ea
commit 5320eab44d
3 changed files with 31 additions and 0 deletions

View File

@@ -38,6 +38,8 @@ pub fn write(output: &mut Output, overlay_desc: &Vec<OverlaySlot>) -> Result<(),
writeln!(output, "\t\t.{} {{", section.name)?;
writeln!(output, "\t\t\t__{}_start = .;", section.name)?;
section.file_pattern.iter().try_for_each(|patr| writeln!(output, "\t\t\tKEEP({}(.header))", patr))?;
writeln!(output, "\t\t\t__{}_lbas = .;", section.name)?;
section.file_pattern.iter().try_for_each(|patr| writeln!(output, "\t\t\tKEEP({}(.header.lbas))", patr))?;
writeln!(output, "\t\t\t__{}_ctor = .;", section.name)?;
for section_type in [".text.startup._GLOBAL__*", ".ctors", ".text.*", ".rodata*", ".sdata*", ".data*", ".sbss*", ".bss*"] {