Rust 1.56 results in a bigger loader. Presumably because "optimization".

This causes the font maps to shift down. Allocate some "room to grow"
as Rust gets more "optimal".
This commit is contained in:
bunnie 2021-10-23 18:36:31 +08:00
parent 7de925d3f1
commit dc527a3619
9 changed files with 3 additions and 3 deletions

View file

@ -90,7 +90,7 @@ SECTIONS
_edata = .;
} > REGION_DATA AT > REGION_RODATA
.fonts ALIGN(131072) : SUBALIGN(131072)
.fonts ALIGN(65536) : SUBALIGN(65536)
{
KEEP(*(.fontdata));
} > REGION_RODATA

0
loader/src/fonts.rs Normal file → Executable file
View file

0
loader/src/fonts/bold.rs Normal file → Executable file
View file

0
loader/src/fonts/emoji.rs Normal file → Executable file
View file

0
loader/src/fonts/hanzi.rs Normal file → Executable file
View file

0
loader/src/fonts/regular.rs Normal file → Executable file
View file

0
loader/src/fonts/small.rs Normal file → Executable file
View file

View file

@ -73,7 +73,7 @@ def main():
mapfile.write("#![allow(dead_code)]\n")
# Python iterators are deterministic, right......? so if I used the same iterator to make the link order it'll be the same here....right?
offset = 0
mapfile.write("pub const FONT_BASE: usize = 0x{:08x};\n".format(0x20520000))
mapfile.write("pub const FONT_BASE: usize = 0x{:08x};\n".format(0x20530000))
for k,v in fontdict.items():
length = int(v) * 4
mapfile.write("pub const {}_OFFSET: usize = 0x{:08x};\n".format(k.upper(), offset))

2
services/graphics-server/src/fontmap.rs Normal file → Executable file
View file

@ -1,7 +1,7 @@
// This file is autogenerated by xous-core/loader/src/generate_fonts.py. Do not edit.
// This makes probably bad assumptions about how link order is computed. Be suspicious of these offsets.
#![allow(dead_code)]
pub const FONT_BASE: usize = 0x20520000;
pub const FONT_BASE: usize = 0x20530000;
pub const BOLD_OFFSET: usize = 0x00000000;
pub const BOLD_LEN: usize = 0x00001774;
pub const EMOJI_OFFSET: usize = 0x00001774;