boards/qemu-intel64/qemu.ld: add .lbss, .ldata and .lrodata to approriate sections
These sections can be emited by gcc in some cases for huge data blocks. For example huge global static uninitialzied arrays can be placed in .lbss section which can mess NuttX memory organization and cause hard to find bugs. Unfortunately this is not well documented in GCC and all we have is this bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=22553 Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
parent
f725c59387
commit
9fb8a17d49
2 changed files with 6 additions and 0 deletions
|
|
@ -71,6 +71,7 @@ SECTIONS
|
||||||
{
|
{
|
||||||
_srodata = ABSOLUTE(.);
|
_srodata = ABSOLUTE(.);
|
||||||
*(.rodata .rodata.*)
|
*(.rodata .rodata.*)
|
||||||
|
*(.lrodata .lrodata.*)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
*(.glue_7)
|
*(.glue_7)
|
||||||
|
|
@ -87,6 +88,7 @@ SECTIONS
|
||||||
{
|
{
|
||||||
_sdata = ABSOLUTE(.);
|
_sdata = ABSOLUTE(.);
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
|
*(.ldata .ldata.*)
|
||||||
*(.gnu.linkonce.d.*)
|
*(.gnu.linkonce.d.*)
|
||||||
CONSTRUCTORS
|
CONSTRUCTORS
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
@ -104,6 +106,7 @@ SECTIONS
|
||||||
{
|
{
|
||||||
_sbss = ABSOLUTE(.);
|
_sbss = ABSOLUTE(.);
|
||||||
*(.bss .bss.*)
|
*(.bss .bss.*)
|
||||||
|
*(.lbss .lbss.*)
|
||||||
*(.gnu.linkonce.b.*)
|
*(.gnu.linkonce.b.*)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ SECTIONS
|
||||||
{
|
{
|
||||||
_srodata = ABSOLUTE(.);
|
_srodata = ABSOLUTE(.);
|
||||||
*(.rodata .rodata.*)
|
*(.rodata .rodata.*)
|
||||||
|
*(.lrodata .lrodata.*)
|
||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
*(.glue_7)
|
*(.glue_7)
|
||||||
|
|
@ -119,6 +120,7 @@ SECTIONS
|
||||||
{
|
{
|
||||||
_sdata = ABSOLUTE(.);
|
_sdata = ABSOLUTE(.);
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
|
*(.ldata .ldata.*)
|
||||||
*(.gnu.linkonce.d.*)
|
*(.gnu.linkonce.d.*)
|
||||||
CONSTRUCTORS
|
CONSTRUCTORS
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
|
|
@ -129,6 +131,7 @@ SECTIONS
|
||||||
{
|
{
|
||||||
_sbss = ABSOLUTE(.);
|
_sbss = ABSOLUTE(.);
|
||||||
*(.bss .bss.*)
|
*(.bss .bss.*)
|
||||||
|
*(.lbss .lbss.*)
|
||||||
*(.gnu.linkonce.b.*)
|
*(.gnu.linkonce.b.*)
|
||||||
*(COMMON)
|
*(COMMON)
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue