diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S index 693a778..c954df4 100644 --- a/arch/mips/lib/barebox.lds.S +++ b/arch/mips/lib/barebox.lds.S @@ -59,7 +59,7 @@ _end = .; - .bss __rel_start (OVERLAY) : { + .bss : { __bss_start = .; *(.sbss.*) *(.bss.*) diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c index df9760e..4b0e252 100644 --- a/arch/mips/lib/reloc.c +++ b/arch/mips/lib/reloc.c @@ -118,7 +118,7 @@ memset(__bss_start, 0, bss_len); cpu_probe(); - length = barebox_image_size + bss_len; + length = __bss_stop - __image_start; relocaddr = ALIGN_DOWN(ram_size - length, SZ_64K); relocaddr = KSEG0ADDR(relocaddr); new_stack = relocaddr - MALLOC_SIZE - 16;