Skip to content

Commit 42cb930

Browse files
committed
rustsbi-qemu: reduce binary size by align SBI segments to 4 bytes
SBI implementations does not need to align by 4K as it cannot use paged memory; that requirement should be met by kernels instead. Signed-off-by: luojia65 <me@luojia.cc>
1 parent f154ec5 commit 42cb930

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rustsbi-qemu/src/linker64.ld

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ SECTIONS
1313
*(.text .text.*)
1414
}
1515

16-
. = ALIGN(4K);
16+
. = ALIGN(4);
1717
etext = .;
1818
srodata = .;
1919
.rodata : {
2020
*(.rodata .rodata.*)
2121
*(.srodata .srodata.*)
2222
}
2323

24-
. = ALIGN(4K);
24+
. = ALIGN(4);
2525
erodata = .;
2626
sdata = .;
2727
.data : {
2828
*(.data .data.*)
2929
*(.sdata .sdata.*)
3030
}
3131

32-
. = ALIGN(4K);
32+
. = ALIGN(4);
3333
edata = .;
3434
.bss : {
3535
*(.bss.uninit)
@@ -38,7 +38,7 @@ SECTIONS
3838
*(.sbss .sbss.*)
3939
}
4040

41-
. = ALIGN(4K);
41+
. = ALIGN(4);
4242
ebss = .;
4343
ekernel = .;
4444

0 commit comments

Comments
 (0)