summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-05-08 09:48:28 +0800
committerGitHub <[email protected]>2018-05-08 09:48:28 +0800
commitf56647c08b2003feeb56efe872b5fbe90e50039b (patch)
tree31797ad1d4719f01c7901f859775e5934bc949a1
parent25e709eefbba819100e53159c6c7e2ddc31fd520 (diff)
parent5d4b8fa2b8583cc1b42995318bfac35a49a2e23c (diff)
Merge pull request #1412 from rtoslab/master
[bsp][imxrt1052]update ctors/dtors sections to fix link error with RT_USING_CPLUSPLUS
-rw-r--r--bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_flexspi_nor.ld12
-rw-r--r--bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_ram.ld12
-rw-r--r--bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram.ld12
-rw-r--r--bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram_txt.ld12
4 files changed, 32 insertions, 16 deletions
diff --git a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_flexspi_nor.ld b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_flexspi_nor.ld
index e459198fc2..b0178bdcdd 100644
--- a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_flexspi_nor.ld
+++ b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_flexspi_nor.ld
@@ -139,7 +139,8 @@ SECTIONS
.ctors :
{
- __CTOR_LIST__ = .;
+ PROVIDE(__ctors_start__ = .);
+ /* __CTOR_LIST__ = .; */
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
@@ -158,18 +159,21 @@ SECTIONS
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
- __CTOR_END__ = .;
+ /* __CTOR_END__ = .; */
+ PROVIDE(__ctors_end__ = .);
} > m_text
.dtors :
{
- __DTOR_LIST__ = .;
+ PROVIDE(__dtors_start__ = .);
+ /* __DTOR_LIST__ = .; */
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
- __DTOR_END__ = .;
+ /* __DTOR_END__ = .; */
+ PROVIDE(__dtors_end__ = .);
} > m_text
.preinit_array :
diff --git a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_ram.ld b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_ram.ld
index ab9693eed8..9077f044ed 100644
--- a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_ram.ld
+++ b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_ram.ld
@@ -126,7 +126,8 @@ SECTIONS
.ctors :
{
- __CTOR_LIST__ = .;
+ PROVIDE(__ctors_start__ = .);
+ /* __CTOR_LIST__ = .; */
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
@@ -145,18 +146,21 @@ SECTIONS
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
- __CTOR_END__ = .;
+ /* __CTOR_END__ = .; */
+ PROVIDE(__ctors_end__ = .);
} > m_text
.dtors :
{
- __DTOR_LIST__ = .;
+ PROVIDE(__dtors_start__ = .);
+ /* __DTOR_LIST__ = .; */
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
- __DTOR_END__ = .;
+ /* __DTOR_END__ = .; */
+ PROVIDE(__dtors_end__ = .);
} > m_text
.preinit_array :
diff --git a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram.ld b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram.ld
index f0faea5245..100e6ed9f2 100644
--- a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram.ld
+++ b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram.ld
@@ -104,7 +104,8 @@ SECTIONS
.ctors :
{
- __CTOR_LIST__ = .;
+ PROVIDE(__ctors_start__ = .);
+ /* __CTOR_LIST__ = .; */
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
@@ -123,18 +124,21 @@ SECTIONS
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
- __CTOR_END__ = .;
+ /* __CTOR_END__ = .; */
+ PROVIDE(__ctors_end__ = .);
} > m_text
.dtors :
{
- __DTOR_LIST__ = .;
+ PROVIDE(__dtors_start__ = .);
+ /* __DTOR_LIST__ = .; */
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
- __DTOR_END__ = .;
+ /* __DTOR_END__ = .; */
+ PROVIDE(__dtors_end__ = .);
} > m_text
.preinit_array :
diff --git a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram_txt.ld b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram_txt.ld
index 58c6ea217e..9206f67501 100644
--- a/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram_txt.ld
+++ b/bsp/imxrt1052-evk/Libraries/gcc/MIMXRT1052xxxxx_sdram_txt.ld
@@ -104,7 +104,8 @@ SECTIONS
.ctors :
{
- __CTOR_LIST__ = .;
+ PROVIDE(__ctors_start__ = .);
+ /* __CTOR_LIST__ = .; */
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
@@ -123,18 +124,21 @@ SECTIONS
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
- __CTOR_END__ = .;
+ /* __CTOR_END__ = .; */
+ PROVIDE(__ctors_end__ = .);
} > m_text
.dtors :
{
- __DTOR_LIST__ = .;
+ PROVIDE(__dtors_start__ = .);
+ /* __DTOR_LIST__ = .; */
KEEP (*crtbegin.o(.dtors))
KEEP (*crtbegin?.o(.dtors))
KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
- __DTOR_END__ = .;
+ /* __DTOR_END__ = .; */
+ PROVIDE(__dtors_end__ = .);
} > m_text
.preinit_array :