still need .init section

This commit is contained in:
Dave Murphy 2016-12-05 10:14:02 +00:00
parent 7b9a6387f4
commit a0f7e4e2da
5 changed files with 30 additions and 5 deletions

View File

@ -26,6 +26,11 @@ SECTIONS
.plt : { *(.plt) } >ewram = 0xff
.init :
{
KEEP (*(SORT_NONE(.init)))
} >ewram
.text : /* ALIGN (4): */
{
*(EXCLUDE_FILE (*.itcm*) .text)

View File

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

View File

@ -79,6 +79,11 @@ SECTIONS
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >rom
.init :
{
KEEP (*(SORT_NONE(.init)))
} >rom
.text : /* ALIGN (4): */
{
*(EXCLUDE_FILE (*.iwram*) .text)

View File

@ -1,7 +1,10 @@
.section ".crt0","ax"
.global _start
.align
.arm
.cpu arm7tdmi
@---------------------------------------------------------------------------------
_start:
@---------------------------------------------------------------------------------
@ -43,8 +46,8 @@ __slave_number:
.word 0 @ reserved
.word 0 @ reserved
.global start_vector
.align
.global start_vector
.align
@---------------------------------------------------------------------------------
start_vector:
@---------------------------------------------------------------------------------

View File

@ -61,18 +61,24 @@ __irq_flags = 0x03007ff8;
SECTIONS
{
. = __text_start;
.init :
. = __text_start;
.crt0 :
{
KEEP (*(.init))
KEEP (*(.crt0))
. = ALIGN(4);
} >ewram =0xff
.plt :
{
{
*(.plt)
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
} >ewram
.init :
{
KEEP (*(SORT_NONE(.init)))
} >ewram
.text ALIGN (4):
{
*(EXCLUDE_FILE (*.iwram*) .text)