Link small sections in linker

This commit is contained in:
Yifan Wu 2021-03-07 19:59:12 +08:00
parent d57a160b32
commit a09429b32c
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)