]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/boot/mips/startup_raw.S: Handle the case of gap between
authorVladimir Serbinenko <phcoder@gmail.com>
Fri, 22 Nov 2013 04:07:32 +0000 (05:07 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Fri, 22 Nov 2013 04:07:32 +0000 (05:07 +0100)
.data and .bss. May happen if compiler and assembly use different
alignment.

ChangeLog
grub-core/boot/mips/startup_raw.S

index 4f5b0c52d9b51faed3646f0e60f1a7709796d1a9..bdb123ef02a915db9cf61a2e26c43f50b1a8bc9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-22  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/boot/mips/startup_raw.S: Handle the case of gap between
+       .data and .bss. May happen if compiler and assembly use different
+       alignment.
+
 2013-11-22  Vladimir Serbinenko  <phcoder@gmail.com>
 
        On MIPS handle got16 relocations to local symbols in an ABI-compliant
index 9e4a7e6d9f8efff87d611ba224efff1bb75612fe..29e93c17ebcbec6a205943ce49f864424ad9564b 100644 (file)
@@ -27,6 +27,7 @@
 
 .extern __bss_start
 .extern _end
+.extern _edata
 
        .globl __start, _start, start
        .set noreorder
@@ -248,8 +249,9 @@ cmdlinedone:
 #include "../../kern/mips/cache_flush.S"
 
        /* Decompress the payload. */
-       lui $a0, %hi(__bss_start)
-       addiu $a0, $a0, %lo(__bss_start)
+       lui $a0, %hi(_edata)
+       addiu $a0, $a0, %lo(_edata)
+
        lui $t0, %hi(base)
        addiu $t0, $t0, %lo(base)
        subu $a0, $a0, $t0
@@ -287,3 +289,11 @@ cmdlinedone:
 
        jr $t1
         nop
+       /* Ensure that .data section is created. In code we suppose that _edata
+          is first location not in decompressor image. Strictly speaking it's
+          _edata only when .data is present and _etext otherwise. But checking
+          for .data presence would cost more in code than it is to ensure that
+          .data is created.
+       */
+       .data
+       .long 0