Link small sections in linker

This commit is contained in:
Yifan Wu 2021-03-07 19:54:09 +08:00
parent f64cff4ccd
commit ce3950488b
3 changed files with 9 additions and 0 deletions

View File

@ -18,6 +18,7 @@ SECTIONS
srodata = .;
.rodata : {
*(.rodata .rodata.*)
*(.srodata .srodata.*)
}
. = ALIGN(4K);
@ -25,6 +26,7 @@ SECTIONS
sdata = .;
.data : {
*(.data .data.*)
*(.sdata .sdata.*)
}
. = ALIGN(4K);
@ -33,6 +35,7 @@ SECTIONS
*(.bss.stack)
sbss = .;
*(.bss .bss.*)
*(.sbss .sbss.*)
}
. = ALIGN(4K);

View File

@ -18,6 +18,7 @@ SECTIONS
srodata = .;
.rodata : {
*(.rodata .rodata.*)
*(.srodata .srodata.*)
}
. = ALIGN(4K);
@ -25,6 +26,7 @@ SECTIONS
sdata = .;
.data : {
*(.data .data.*)
*(.sdata .sdata.*)
}
. = ALIGN(4K);
@ -33,6 +35,7 @@ SECTIONS
*(.bss.stack)
sbss = .;
*(.bss .bss.*)
*(.sbss .sbss.*)
}
. = ALIGN(4K);

View File

@ -13,13 +13,16 @@ SECTIONS
}
.rodata : {
*(.rodata .rodata.*)
*(.srodata .srodata.*)
}
.data : {
*(.data .data.*)
*(.sdata .sdata.*)
}
.bss : {
start_bss = .;
*(.bss .bss.*)
*(.sbss .sbss.*)
end_bss = .;
}
/DISCARD/ : {