Not all boards cope with automatically sized bootblocks, leading to 4GB
images due to the "helpful" 4GB rollover behaviour of ld(1). Back out r4961, something like this should go in eventually, but more completely tested and working. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4971 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
702a5a5741
commit
0f6ee7b719
|
@ -40,10 +40,8 @@ SECTIONS
|
||||||
_x = .;
|
_x = .;
|
||||||
. = (_x < (CONFIG_ROMBASE - 0x10000 + CONFIG_ROM_IMAGE_SIZE)) ? (CONFIG_ROMBASE - 0x10000 + CONFIG_ROM_IMAGE_SIZE) : _x;
|
. = (_x < (CONFIG_ROMBASE - 0x10000 + CONFIG_ROM_IMAGE_SIZE)) ? (CONFIG_ROMBASE - 0x10000 + CONFIG_ROM_IMAGE_SIZE) : _x;
|
||||||
|
|
||||||
__my_rom_start = .;
|
|
||||||
|
|
||||||
/* This section might be better named .setup */
|
/* This section might be better named .setup */
|
||||||
.rom _myrom : {
|
.rom . : {
|
||||||
_rom = .;
|
_rom = .;
|
||||||
*(.rom.text);
|
*(.rom.text);
|
||||||
*(.rom.data);
|
*(.rom.data);
|
||||||
|
@ -56,7 +54,6 @@ SECTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
_lrom = LOADADDR(.rom);
|
_lrom = LOADADDR(.rom);
|
||||||
|
|
||||||
_elrom = LOADADDR(.rom) + SIZEOF(.rom);
|
_elrom = LOADADDR(.rom) + SIZEOF(.rom);
|
||||||
|
|
||||||
/DISCARD/ : {
|
/DISCARD/ : {
|
||||||
|
@ -65,13 +62,4 @@ SECTIONS
|
||||||
*(.comment.*)
|
*(.comment.*)
|
||||||
*(.note.*)
|
*(.note.*)
|
||||||
}
|
}
|
||||||
|
|
||||||
__my_rom_end = .;
|
|
||||||
|
|
||||||
__my_rom_size = (( ( __my_rom_end - __my_rom_start ) / 256) + 2 ) * 256;
|
|
||||||
/* Next line gives same output for me as above one but causes
|
|
||||||
* ld to complain about non constant offset so
|
|
||||||
__my_rom_size = (( (SIZEOF(.rom) + SIZEOF(.data) + SIZEOF(.text)) / 256 ) + 2 ) * 256;
|
|
||||||
*/
|
|
||||||
_myrom = _rom + (0x10000 - __my_rom_size);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue