]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
MIPS: u-boot.lds: merge all BSS sections and introduce symbols __bss_[start|end]
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tue, 12 Feb 2013 21:22:12 +0000 (22:22 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tue, 12 Feb 2013 21:22:12 +0000 (22:22 +0100)
These symbols are used in later patches for as addresses for
clearing the BSS area in the relocated U-Boot image.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
arch/mips/cpu/u-boot.lds
arch/mips/include/asm/u-boot-mips.h

index 58a49b2137bf4a1bc912b41340ca388017d38d14..6980b86b9f2329d8354309813b6e2a6811fd5b1b 100644 (file)
@@ -70,13 +70,14 @@ SECTIONS
        uboot_end_data = .;
 
        . = ALIGN(4);
-       .sbss : {
-               *(.sbss*)
-       }
-
        .bss : {
-               *(.bss*)
+               __bss_start = .;
+               *(.sbss.*)
+               *(.bss.*)
+               *(COMMON)
                . = ALIGN(4);
+               __bss_end = .;
        }
+
        uboot_end = .;
 }
index 6f26dfac56cd90be16687edbf0f64205e35aaa23..eda04987342ad8bf2a73f3e8e3f8cf69603f3638 100644 (file)
@@ -8,4 +8,16 @@
 extern ulong uboot_end_data;
 extern ulong uboot_end;
 
+static inline unsigned long bss_start(void)
+{
+       extern ulong __bss_start;
+       return (unsigned long) &__bss_start;
+}
+
+static inline unsigned long bss_end(void)
+{
+       extern ulong __bss_end;
+       return (unsigned long) &__bss_end;
+}
+
 extern int incaip_set_cpuclk(void);