[PATCH 1/1] x86: lib: fix link error for legacy (non-EFI) boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The mbr and barebox memory regions defined in the linker script overlap,
which leads recent linkers to complain loudly and abort the build:

	ld: section .bootstrapping VMA [0000000000007e00,000000000000841f]
	overlaps section .bootsector VMA [0000000000007c00,0000000000007fff]

Correcting the region boundaries fixes the error. barebox can still not
boot completely, boot it at least build and shows early debug output.

Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx>
---
 arch/x86/lib/barebox.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S
index b24c4807b59d..0747d40d752b 100644
--- a/arch/x86/lib/barebox.lds.S
+++ b/arch/x86/lib/barebox.lds.S
@@ -10,7 +10,7 @@ ENTRY(_start)
 MEMORY
 {
 	mbr(rwx): ORIGIN = TEXT_BASE, LENGTH = 2 * SECTOR_SIZE
-	barebox (rwx) : ORIGIN = TEXT_BASE + SECTOR_SIZE, LENGTH = (256 * 1024 * 1024)
+	barebox (rwx) : ORIGIN = TEXT_BASE + 2 * SECTOR_SIZE, LENGTH = (256 * 1024 * 1024)
 }
 
 SECTIONS
-- 
2.30.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux