summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/lib/barebox.lds.S2
-rw-r--r--arch/mips/lib/reloc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S
index 693a778980..c954df41f3 100644
--- a/arch/mips/lib/barebox.lds.S
+++ b/arch/mips/lib/barebox.lds.S
@@ -59,7 +59,7 @@ SECTIONS
_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 df9760e38c..4b0e252352 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -118,7 +118,7 @@ void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
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;