restore .init section

This commit is contained in:
Dave Murphy 2016-12-18 02:28:32 +00:00
parent a0f7e4e2da
commit 4b7796c2d5
8 changed files with 39 additions and 14 deletions

View File

@ -27,8 +27,16 @@ SECTIONS
KEEP (*(.crt0))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >iwram = 0xff
.init :
{
KEEP (*(SORT_NONE(.init)))
} >iwram = 0xff
.plt : { *(.plt) } >iwram = 0xff
.text : /* ALIGN (4): */
{
*(.text .stub .text.* .gnu.linkonce.t.*)

View File

@ -28,6 +28,12 @@ SECTIONS
KEEP (*(.crt0))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >vram = 0xff
.init :
{
KEEP (*(SORT_NONE(.init)))
} >vram = 0xff
.plt : { *(.plt) } >vram = 0xff
.text : /* ALIGN (4): */

View File

@ -1,7 +1,7 @@
MEMORY {
rom : ORIGIN = 0x08000000, LENGTH = 32M
ewram : ORIGIN = 0x02000000, LENGTH = 4M - 4k
rom : ORIGIN = 0x08000000, LENGTH = 32M
ewram : ORIGIN = 0x02000000, LENGTH = 4M - 32k
dtcm : ORIGIN = 0x0b000000, LENGTH = 16K
vectors : ORIGIN = 0x01000000, LENGTH = 256
itcm : ORIGIN = 0x01000100, LENGTH = 32K - 256

View File

@ -29,6 +29,11 @@ SECTIONS
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >rom = 0xff
.init :
{
KEEP (*(SORT_NONE(.init)))
} >rom = 0xff
.plt : { *(.plt) } >rom = 0xff
.init :

View File

@ -1,7 +1,5 @@
MEMORY {
rom : ORIGIN = 0x08000000, LENGTH = 32M
ewram : ORIGIN = 0x02000000, LENGTH = 16M - 4k
ewram : ORIGIN = 0x02000000, LENGTH = 16M - 32k
dtcm : ORIGIN = 0x0b000000, LENGTH = 16K
vectors : ORIGIN = 0x01000000, LENGTH = 256
itcm : ORIGIN = 0x01000100, LENGTH = 32K - 256

View File

@ -73,17 +73,18 @@ SECTIONS
. = ALIGN(4);
} >rom =0xff
.plt :
{
*(.plt)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >rom
.init :
{
KEEP (*(SORT_NONE(.init)))
} >rom
.plt :
{
*(.plt)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >rom
.text : /* ALIGN (4): */
{
*(EXCLUDE_FILE (*.iwram*) .text)

View File

@ -68,16 +68,17 @@ SECTIONS
. = ALIGN(4);
} >ewram =0xff
.init :
{
KEEP (*(SORT_NONE(.init)))
} >ewram
.plt :
{
*(.plt)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ewram
.init :
{
KEEP (*(SORT_NONE(.init)))
} >ewram
.text ALIGN (4):
{

View File

@ -15,6 +15,12 @@ SECTIONS
KEEP (*(.crt0))
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ram = 0xff
.init :
{
KEEP (*(SORT_NONE(.init)))
} >ram
.plt : { *(.plt) } >ram = 0xff