[coreboot] New patch to review for coreboot: f7add09 Don't use 64-bit constant 0x100000000 in linker scripts

Nico Huber (nico.huber@secunet.com) gerrit at coreboot.org
Wed Jun 20 17:36:58 CEST 2012


Nico Huber (nico.huber at secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1129

-gerrit

commit f7add093007f02659c5b7f077fbe13608db9c3a9
Author: Nico Huber <nico.huber at secunet.com>
Date:   Thu Jun 14 16:03:01 2012 +0200

    Don't use 64-bit constant 0x100000000 in linker scripts
    
    The constant value 0x100000000 is used in linker scripts to calculate
    offsets from the end of 32-bit-addressed memory. There is nothing
    wrong with it, but 32-bit versions of ld do the calculation wrong.
    
    Change-Id: I4e27c6fd0c864b4d98f686588bf78c7aa48bcba8
    Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
 src/arch/x86/lib/id.lds                   |    2 +-
 src/northbridge/via/vx800/romstrap.lds    |    2 +-
 src/southbridge/nvidia/ck804/romstrap.lds |    2 +-
 src/southbridge/nvidia/mcp55/romstrap.lds |    2 +-
 src/southbridge/sis/sis966/romstrap.lds   |    2 +-
 src/southbridge/via/k8t890/romstrap.lds   |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/arch/x86/lib/id.lds b/src/arch/x86/lib/id.lds
index 9e31ee6..cfd091d 100644
--- a/src/arch/x86/lib/id.lds
+++ b/src/arch/x86/lib/id.lds
@@ -1,5 +1,5 @@
 SECTIONS {
-	. = (0x100000000 - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start);
+	. = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1;
 	.id (.): {
 		*(.id)
 	}
diff --git a/src/northbridge/via/vx800/romstrap.lds b/src/northbridge/via/vx800/romstrap.lds
index 4326b28..cd2b546 100644
--- a/src/northbridge/via/vx800/romstrap.lds
+++ b/src/northbridge/via/vx800/romstrap.lds
@@ -19,7 +19,7 @@
  */
 
 SECTIONS {
-	. = (0x100000000 - 0x2c) - (__romstrap_end - __romstrap_start);
+	. = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
 	.romstrap (.): {
 		*(.romstrap)
 	}
diff --git a/src/southbridge/nvidia/ck804/romstrap.lds b/src/southbridge/nvidia/ck804/romstrap.lds
index c2ad368..3b8f497 100644
--- a/src/southbridge/nvidia/ck804/romstrap.lds
+++ b/src/southbridge/nvidia/ck804/romstrap.lds
@@ -19,7 +19,7 @@
  */
 
 SECTIONS {
-	. = (0x100000000 - 0x10) - (__romstrap_end - __romstrap_start);
+	. = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
 	.romstrap (.): {
 		*(.romstrap)
 	}
diff --git a/src/southbridge/nvidia/mcp55/romstrap.lds b/src/southbridge/nvidia/mcp55/romstrap.lds
index c08aa32..4dad422 100644
--- a/src/southbridge/nvidia/mcp55/romstrap.lds
+++ b/src/southbridge/nvidia/mcp55/romstrap.lds
@@ -20,7 +20,7 @@
  */
 
 SECTIONS {
-	. = (0x100000000 - 0x10) - (__romstrap_end - __romstrap_start);
+	. = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
 	.romstrap (.): {
 		*(.romstrap)
 	}
diff --git a/src/southbridge/sis/sis966/romstrap.lds b/src/southbridge/sis/sis966/romstrap.lds
index c08aa32..4dad422 100644
--- a/src/southbridge/sis/sis966/romstrap.lds
+++ b/src/southbridge/sis/sis966/romstrap.lds
@@ -20,7 +20,7 @@
  */
 
 SECTIONS {
-	. = (0x100000000 - 0x10) - (__romstrap_end - __romstrap_start);
+	. = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
 	.romstrap (.): {
 		*(.romstrap)
 	}
diff --git a/src/southbridge/via/k8t890/romstrap.lds b/src/southbridge/via/k8t890/romstrap.lds
index e2f470c..67deebc 100644
--- a/src/southbridge/via/k8t890/romstrap.lds
+++ b/src/southbridge/via/k8t890/romstrap.lds
@@ -22,7 +22,7 @@
 /* Modified for K8T890 ROM strap by Rudolf Marek <r.marek at assembler.cz>. */
 
 SECTIONS {
-	. = (0x100000000 - 0x2c) - (__romstrap_end - __romstrap_start);
+	. = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
 	.romstrap (.): {
 		*(.romstrap)
 	}




More information about the coreboot mailing list