Browse Source

fixed linker script and stack align issues.

aozima 5 years ago
parent
commit
525d353403

+ 2 - 2
bsp/allwinner_tina/link.lds

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

+ 2 - 2
bsp/beaglebone/beaglebone_ram.lds

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

+ 1 - 0
bsp/imx6sx/cortex-a9/cpu/start_gcc.S

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

+ 2 - 2
bsp/imx6sx/cortex-a9/imx6.lds

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

+ 3 - 3
bsp/imx6ul/imx6.lds

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

+ 3 - 3
bsp/lpc2478/lpc2478_ram.lds

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

+ 3 - 3
bsp/qemu-vexpress-a9/link.lds

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

+ 1 - 0
bsp/qemu-vexpress-gemini/cpu/start_gcc.S

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

+ 3 - 3
bsp/qemu-vexpress-gemini/vexpress.lds

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

+ 1 - 0
bsp/raspi2/cpu/start_gcc.S

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

+ 3 - 3
bsp/realview-a8/realview.lds

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

+ 1 - 0
libcpu/arm/am335x/start_gcc.S

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

+ 1 - 0
libcpu/arm/cortex-a/start_gcc.S

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

+ 1 - 0
libcpu/arm/cortex-r4/start_gcc.S

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

+ 1 - 0
libcpu/arm/realview-a8-vmm/start_gcc.S

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

+ 1 - 0
libcpu/arm/zynq7000/start_gcc.S

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