* 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.
This commit is contained in:
Vladimir Serbinenko 2013-11-22 05:07:32 +01:00
parent a0e1befb57
commit 054efe541f
2 changed files with 18 additions and 2 deletions

View File

@ -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

View 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