Browse Source

Merge pull request #898 from aozima/pulls

[BSP] Fix the align issue in __bss_start. 
[Tools] Auto-detect the parameter type in SrcRemove.
Bernard Xiong 7 years ago
parent
commit
6c0a2e8ffc

+ 1 - 1
bsp/beaglebone/beaglebone_ram.lds

@@ -67,7 +67,7 @@ SECTIONS
     __data_end = .;
     __data_end = .;
 
 
     . = ALIGN(4);
     . = ALIGN(4);
-    __bss_start = __data_end;
+    __bss_start = .;
     .bss       :
     .bss       :
     {
     {
     *(.bss)
     *(.bss)

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

@@ -75,7 +75,7 @@ SECTIONS
     __data_end = .;
     __data_end = .;
 
 
     . = ALIGN(4);
     . = ALIGN(4);
-    __bss_start = __data_end;
+    __bss_start = .;
     .bss       :
     .bss       :
     {
     {
     *(.bss)
     *(.bss)

+ 1 - 1
bsp/zynq7000/zynq7000.ld

@@ -92,7 +92,7 @@ SECTIONS
     __data_end = .;
     __data_end = .;
 
 
     . = ALIGN(4);
     . = ALIGN(4);
-    __bss_start = __data_end;
+    __bss_start = 0;
     .bss       :
     .bss       :
     {
     {
     *(.bss)
     *(.bss)

+ 5 - 7
tools/building.py

@@ -695,15 +695,13 @@ def SrcRemove(src, remove):
     if not src:
     if not src:
         return
         return
 
 
-    if type(src[0]) == type('str'):
-        for item in src:
+    for item in src:
+        if type(item) == type('str'):
             if os.path.basename(item) in remove:
             if os.path.basename(item) in remove:
                 src.remove(item)
                 src.remove(item)
-        return
-
-    for item in src:
-        if os.path.basename(item.rstr()) in remove:
-            src.remove(item)
+        else:
+            if os.path.basename(item.rstr()) in remove:
+                src.remove(item)
 
 
 def GetVersion():
 def GetVersion():
     import SCons.cpp
     import SCons.cpp