fixed linker script and stack align issues.

This commit is contained in:
aozima 2019-10-22 09:47:41 +08:00
parent c1bf9e645e
commit 525d353403
16 changed files with 29 additions and 21 deletions

View File

@ -82,8 +82,8 @@ SECTIONS
PROVIDE(__dtors_end__ = .); PROVIDE(__dtors_end__ = .);
} }
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -118,7 +118,7 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = .; __bss_start = .;
.bss : .bss :
{ {

View File

@ -57,8 +57,8 @@ SECTIONS
PROVIDE(__dtors_end__ = .); PROVIDE(__dtors_end__ = .);
} }
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -66,7 +66,7 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = .; __bss_start = .;
.bss : .bss :
{ {

View File

@ -34,6 +34,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
stack_start: stack_start:
.rept ISR_Stack_Size .rept ISR_Stack_Size
.byte 0 .byte 0

View File

@ -65,8 +65,8 @@ SECTIONS
. += 16K; . += 16K;
} }
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -74,7 +74,7 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = .; __bss_start = .;
.bss : .bss :
{ {

View File

@ -65,8 +65,8 @@ SECTIONS
. += 16K; . += 16K;
} }
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -74,8 +74,8 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = __data_end; __bss_start = .;
.bss : .bss :
{ {
*(.bss) *(.bss)

View File

@ -19,8 +19,8 @@ SECTIONS
__rodata_end = .; __rodata_end = .;
. = 0xa0100000; . = 0xa0100000;
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -28,8 +28,8 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = __data_end; __bss_start = .;
.bss : .bss :
{ {
*(.bss) *(.bss)

View File

@ -67,8 +67,8 @@ SECTIONS
PROVIDE(__dtors_end__ = .); PROVIDE(__dtors_end__ = .);
} }
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -76,8 +76,8 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = __data_end; __bss_start = .;
.bss : .bss :
{ {
*(.bss) *(.bss)

View File

@ -48,6 +48,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
stack_start: stack_start:
.rept ISR_Stack_Size .rept ISR_Stack_Size
.byte 0 .byte 0

View File

@ -57,8 +57,8 @@ SECTIONS
PROVIDE(__dtors_end__ = .); PROVIDE(__dtors_end__ = .);
} }
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -66,8 +66,8 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = __data_end; __bss_start = .;
.bss : .bss :
{ {
*(.bss) *(.bss)

View File

@ -48,6 +48,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
stack_start: stack_start:
.rept ISR_Stack_Size .rept ISR_Stack_Size
.byte 0 .byte 0

View File

@ -57,8 +57,8 @@ SECTIONS
PROVIDE(__dtors_end__ = .); PROVIDE(__dtors_end__ = .);
} }
. = ALIGN(8);
__data_start = .; __data_start = .;
. = ALIGN(4);
.data : .data :
{ {
*(.data) *(.data)
@ -66,8 +66,8 @@ SECTIONS
} }
__data_end = .; __data_end = .;
. = ALIGN(4); . = ALIGN(8);
__bss_start = __data_end; __bss_start = .;
.bss : .bss :
{ {
*(.bss) *(.bss)

View File

@ -33,6 +33,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
stack_start: stack_start:
.rept ISR_Stack_Size .rept ISR_Stack_Size
.long 0 .long 0

View File

@ -41,6 +41,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
stack_start: stack_start:
.rept ISR_Stack_Size .rept ISR_Stack_Size
.byte 0 .byte 0

View File

@ -36,6 +36,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
stack_start: stack_start:
.rept (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + FIQ_Stack_Size + IRQ_Stack_Size) .rept (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + FIQ_Stack_Size + IRQ_Stack_Size)
.byte 0 .byte 0

View File

@ -47,6 +47,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
stack_start: stack_start:
.rept ISR_Stack_Size .rept ISR_Stack_Size
.byte 0 .byte 0

View File

@ -33,6 +33,7 @@
.globl stack_start .globl stack_start
.globl stack_top .globl stack_top
.align 3
.bss .bss
stack_start: stack_start:
.rept ISR_Stack_Size .rept ISR_Stack_Size