Link small sections in linker

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

View File

@ -22,6 +22,7 @@ SECTIONS
srodata = .;
.rodata : {
*(.rodata .rodata.*)
*(.srodata .srodata.*)
}
. = ALIGN(4K);
@ -29,6 +30,7 @@ SECTIONS
sdata = .;
.data : {
*(.data .data.*)
*(.sdata .sdata.*)
}
. = ALIGN(4K);
@ -38,6 +40,7 @@ SECTIONS
*(.bss.stack)
sbss = .;
*(.bss .bss.*)
*(.sbss .sbss.*)
}
. = ALIGN(4K);

View File

@ -22,6 +22,7 @@ SECTIONS
srodata = .;
.rodata : {
*(.rodata .rodata.*)
*(.srodata .srodata.*)
}
. = ALIGN(4K);
@ -29,6 +30,7 @@ SECTIONS
sdata = .;
.data : {
*(.data .data.*)
*(.sdata .sdata.*)
}
. = ALIGN(4K);
@ -38,6 +40,7 @@ SECTIONS
*(.bss.stack)
sbss = .;
*(.bss .bss.*)
*(.sbss .sbss.*)
}
. = ALIGN(4K);

View File

@ -14,13 +14,16 @@ SECTIONS
. = ALIGN(4K);
.rodata : {
*(.rodata .rodata.*)
*(.srodata .srodata.*)
}
. = ALIGN(4K);
.data : {
*(.data .data.*)
*(.sdata .sdata.*)
}
.bss : {
*(.bss .bss.*)
*(.sbss .sbss.*)
}
/DISCARD/ : {
*(.eh_frame)