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@secunet.com>
Reviewed-on: http://review.coreboot.org/1129
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
This commit is contained in:
Nico Huber 2012-06-14 16:03:01 +02:00 committed by Patrick Georgi
parent 1454685327
commit 904a0ec9d0
6 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
SECTIONS { SECTIONS {
. = (0x100000000 - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start); . = (0xffffffff - CONFIG_ID_SECTION_OFFSET) - (__id_end - __id_start) + 1;
.id (.): { .id (.): {
*(.id) *(.id)
} }

View File

@ -19,7 +19,7 @@
*/ */
SECTIONS { SECTIONS {
. = (0x100000000 - 0x2c) - (__romstrap_end - __romstrap_start); . = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
.romstrap (.): { .romstrap (.): {
*(.romstrap) *(.romstrap)
} }

View File

@ -19,7 +19,7 @@
*/ */
SECTIONS { SECTIONS {
. = (0x100000000 - 0x10) - (__romstrap_end - __romstrap_start); . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
.romstrap (.): { .romstrap (.): {
*(.romstrap) *(.romstrap)
} }

View File

@ -20,7 +20,7 @@
*/ */
SECTIONS { SECTIONS {
. = (0x100000000 - 0x10) - (__romstrap_end - __romstrap_start); . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
.romstrap (.): { .romstrap (.): {
*(.romstrap) *(.romstrap)
} }

View File

@ -20,7 +20,7 @@
*/ */
SECTIONS { SECTIONS {
. = (0x100000000 - 0x10) - (__romstrap_end - __romstrap_start); . = (0xffffffff - 0x10) - (__romstrap_end - __romstrap_start) + 1;
.romstrap (.): { .romstrap (.): {
*(.romstrap) *(.romstrap)
} }

View File

@ -22,7 +22,7 @@
/* Modified for K8T890 ROM strap by Rudolf Marek <r.marek@assembler.cz>. */ /* Modified for K8T890 ROM strap by Rudolf Marek <r.marek@assembler.cz>. */
SECTIONS { SECTIONS {
. = (0x100000000 - 0x2c) - (__romstrap_end - __romstrap_start); . = (0xffffffff - 0x2c) - (__romstrap_end - __romstrap_start) + 1;
.romstrap (.): { .romstrap (.): {
*(.romstrap) *(.romstrap)
} }